feat: Add embed colors (default, fail, success)
This commit is contained in:
parent
c8fec5b0c7
commit
8e9855f6eb
7 changed files with 19 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "muffinbot",
|
||||
"version": "4.0.0-pudding.d241004b",
|
||||
"version": "4.0.0-pudding.d241005a",
|
||||
"main": "dist/index.js",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -17,13 +17,17 @@ const release = version
|
|||
.split('.')[1]
|
||||
|
||||
container.config = config
|
||||
container.embedColor = 0xaddb87
|
||||
container.prefix = config.bot.prefix
|
||||
container.version = version
|
||||
container.database = new PrismaClient()
|
||||
container.dokdoAliases = ['dokdo', 'dok', 'Dokdo', 'Dok', '테스트']
|
||||
container.chatBot = new ChatBot(container.database)
|
||||
container.lastUpdated = new Date('2024-10-04')
|
||||
container.lastUpdated = new Date('2024-10-05')
|
||||
container.embedColors = {
|
||||
default: 0xaddb87,
|
||||
fail: 0xff0000,
|
||||
success: 0x00ff00,
|
||||
}
|
||||
|
||||
if (release.startsWith('e')) {
|
||||
container.channel = 'EXPERIMENTAL'
|
||||
|
@ -80,7 +84,11 @@ declare module '@sapphire/framework' {
|
|||
config: Config
|
||||
channel: 'EXPERIMENTAL' | 'DEV' | 'PREVIEW' | 'RELEASE'
|
||||
lastUpdated: Date
|
||||
embedColor: number
|
||||
embedColors: {
|
||||
default: number
|
||||
fail: number
|
||||
success: number
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ class DeleteLearnCommand extends Command {
|
|||
title: '삭제',
|
||||
description: `${codeBlock('md', deleteDataList.join('\n'))}`,
|
||||
timestamp: new Date().toISOString(),
|
||||
color: this.container.embedColor,
|
||||
color: this.container.embedColors.default,
|
||||
},
|
||||
],
|
||||
components: [
|
||||
|
|
|
@ -63,7 +63,7 @@ class HelpCommand extends Command {
|
|||
footer: {
|
||||
text: `머핀봇 버전: ${this.container.version}`,
|
||||
},
|
||||
color: this.container.embedColor,
|
||||
color: this.container.embedColors.default,
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
],
|
||||
|
@ -110,6 +110,7 @@ class HelpCommand extends Command {
|
|||
text: `머핀봇 버전: ${this.container.version}`,
|
||||
},
|
||||
timestamp: new Date().toISOString(),
|
||||
color: this.container.embedColors.default,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
|
|
@ -22,7 +22,7 @@ class InformationCommand extends Command {
|
|||
embeds: [
|
||||
{
|
||||
title: `${this.container.client.user?.username}의 정ㅂ보`,
|
||||
color: this.container.embedColor,
|
||||
color: this.container.embedColors.default,
|
||||
fields: [
|
||||
{
|
||||
name: '구동ㅎ환경',
|
||||
|
|
|
@ -48,7 +48,7 @@ class ListCommand extends Command {
|
|||
'md',
|
||||
list.map(item => `- ${item}`).join('\n'),
|
||||
)}`,
|
||||
color: this.container.embedColor,
|
||||
color: this.container.embedColors.default,
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
],
|
||||
|
|
|
@ -38,7 +38,7 @@ class DeleteLearnHandler extends InteractionHandler {
|
|||
{
|
||||
title: '삭제',
|
||||
description: '아무것도 삭제하지 않았어요.',
|
||||
color: 0x00ff00,
|
||||
color: this.container.embedColors.fail,
|
||||
},
|
||||
],
|
||||
components: [],
|
||||
|
@ -60,7 +60,7 @@ class DeleteLearnHandler extends InteractionHandler {
|
|||
title: '삭제',
|
||||
description: `${Number(itemId[0]!)}번을 정상적으로 삭제하ㅇ였어요.`,
|
||||
timestamp: new Date().toISOString(),
|
||||
color: this.container.embedColor,
|
||||
color: this.container.embedColors.success,
|
||||
},
|
||||
],
|
||||
components: [],
|
||||
|
|
Loading…
Reference in a new issue