chore: Rename variable name
This commit is contained in:
parent
9821bac66a
commit
d7faeac384
4 changed files with 11 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "muffinbot",
|
||||
"version": "4.0.0-pudding.d240928b",
|
||||
"version": "4.0.0-pudding.d240928c",
|
||||
"main": "dist/index.js",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -25,13 +25,13 @@ container.chatBot = new ChatBot(container.database)
|
|||
container.lastUpdated = new Date('2024-09-28')
|
||||
|
||||
if (release.startsWith('e')) {
|
||||
container.release = 'EXPERIMENTAL'
|
||||
container.channel = 'EXPERIMENTAL'
|
||||
} else if (release.startsWith('d')) {
|
||||
container.release = 'DEV'
|
||||
container.channel = 'DEV'
|
||||
} else if (release.startsWith('p')) {
|
||||
container.release = 'PREVIEW'
|
||||
container.channel = 'PREVIEW'
|
||||
} else {
|
||||
container.release = 'RELEASE'
|
||||
container.channel = 'RELEASE'
|
||||
}
|
||||
|
||||
export default class MuffinBot extends SapphireClient {
|
||||
|
@ -58,11 +58,11 @@ export default class MuffinBot extends SapphireClient {
|
|||
}
|
||||
|
||||
public override async login(): Promise<string> {
|
||||
if (container.release === 'RELEASE') await container.chatBot.train(this)
|
||||
if (container.channel === 'RELEASE') await container.chatBot.train(this)
|
||||
else
|
||||
container.logger.info(
|
||||
'[MuffinBot] 해당 채널은 RELEASE 채널이 아니라서 학습 기능이 꺼졌습니다.\n' +
|
||||
`현재 채널: ${container.release}`,
|
||||
`현재 채널: ${container.channel}`,
|
||||
)
|
||||
return super.login(config.bot.token)
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ declare module '@sapphire/framework' {
|
|||
version: string
|
||||
dokdoAliases: string[]
|
||||
config: Config
|
||||
release: 'EXPERIMENTAL' | 'DEV' | 'PREVIEW' | 'RELEASE'
|
||||
channel: 'EXPERIMENTAL' | 'DEV' | 'PREVIEW' | 'RELEASE'
|
||||
lastUpdated: Date
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class InformationCommand extends Command {
|
|||
},
|
||||
{
|
||||
name: '채ㄴ널',
|
||||
value: this.container.release.toLowerCase(),
|
||||
value: this.container.channel.toLowerCase(),
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ class MessageCreateListener extends Listener {
|
|||
})
|
||||
if (msg.author.bot) return
|
||||
if (msg.content.startsWith(prefix)) {
|
||||
if (this.container.release !== 'RELEASE') {
|
||||
if (this.container.channel !== 'RELEASE') {
|
||||
await msg.reply({
|
||||
embeds: [
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ class MessageCreateListener extends Listener {
|
|||
`만약 오류가 발견되면 ${(await this.container.client.users.fetch(this.container.config.bot.owner_ID)).username}님에게 알려주세요.\n`,
|
||||
color: 0xff0000,
|
||||
footer: {
|
||||
text: `현재 브랜치: ${this.container.release.toLowerCase()} 버전: ${this.container.version}`,
|
||||
text: `현재 채널: ${this.container.channel.toLowerCase()} 버전: ${this.container.version}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue