chore: Add emebed's color
This commit is contained in:
parent
4931390542
commit
aa8dc685ef
6 changed files with 10 additions and 4 deletions
|
@ -17,6 +17,7 @@ const release = version
|
||||||
.split('.')[1]
|
.split('.')[1]
|
||||||
|
|
||||||
container.config = config
|
container.config = config
|
||||||
|
container.embedColor = 0xaddb87
|
||||||
container.prefix = config.bot.prefix
|
container.prefix = config.bot.prefix
|
||||||
container.version = version
|
container.version = version
|
||||||
container.database = new PrismaClient()
|
container.database = new PrismaClient()
|
||||||
|
@ -78,6 +79,7 @@ declare module '@sapphire/framework' {
|
||||||
config: Config
|
config: Config
|
||||||
channel: 'EXPERIMENTAL' | 'DEV' | 'PREVIEW' | 'RELEASE'
|
channel: 'EXPERIMENTAL' | 'DEV' | 'PREVIEW' | 'RELEASE'
|
||||||
lastUpdated: Date
|
lastUpdated: Date
|
||||||
|
embedColor: number
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { ApplyOptions } from '@sapphire/decorators'
|
||||||
import {
|
import {
|
||||||
Args,
|
Args,
|
||||||
Command,
|
Command,
|
||||||
|
@ -10,7 +11,6 @@ import {
|
||||||
ComponentType,
|
ComponentType,
|
||||||
codeBlock,
|
codeBlock,
|
||||||
} from 'discord.js'
|
} from 'discord.js'
|
||||||
import { ApplyOptions } from '@sapphire/decorators'
|
|
||||||
|
|
||||||
@ApplyOptions<Command.Options>({
|
@ApplyOptions<Command.Options>({
|
||||||
name: '삭제',
|
name: '삭제',
|
||||||
|
@ -59,6 +59,7 @@ class DeleteLearnCommand extends Command {
|
||||||
title: '삭제',
|
title: '삭제',
|
||||||
description: `${codeBlock('md', deleteDataList.join('\n'))}`,
|
description: `${codeBlock('md', deleteDataList.join('\n'))}`,
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
|
color: this.container.embedColor,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
components: [
|
components: [
|
||||||
|
|
|
@ -35,6 +35,7 @@ class HelpCommand extends Command {
|
||||||
footer: {
|
footer: {
|
||||||
text: `머핀봇 버전: ${this.container.version}`,
|
text: `머핀봇 버전: ${this.container.version}`,
|
||||||
},
|
},
|
||||||
|
color: this.container.embedColor,
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -16,6 +16,7 @@ class InformationCommand extends Command {
|
||||||
embeds: [
|
embeds: [
|
||||||
{
|
{
|
||||||
title: `${this.container.client.user?.username}의 정ㅂ보`,
|
title: `${this.container.client.user?.username}의 정ㅂ보`,
|
||||||
|
color: this.container.embedColor,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: '구동ㅎ환경',
|
name: '구동ㅎ환경',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import { Command, container } from '@sapphire/framework'
|
||||||
import { ApplyOptions } from '@sapphire/decorators'
|
import { ApplyOptions } from '@sapphire/decorators'
|
||||||
import { Message, codeBlock } from 'discord.js'
|
import { Message, codeBlock } from 'discord.js'
|
||||||
import { Command, container } from '@sapphire/framework'
|
|
||||||
|
|
||||||
@ApplyOptions<Command.Options>({
|
@ApplyOptions<Command.Options>({
|
||||||
name: '리스트',
|
name: '리스트',
|
||||||
|
@ -36,7 +36,7 @@ class ListCommand extends Command {
|
||||||
'md',
|
'md',
|
||||||
list.map(item => `- ${item}`).join('\n'),
|
list.map(item => `- ${item}`).join('\n'),
|
||||||
)}`,
|
)}`,
|
||||||
color: 0x0000ff,
|
color: this.container.embedColor,
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -33,7 +33,7 @@ class DeleteLearnHandler extends InteractionHandler {
|
||||||
const decimalRegexp = /^[0-9]/g
|
const decimalRegexp = /^[0-9]/g
|
||||||
|
|
||||||
const itemId = interaction.component.options.map(item =>
|
const itemId = interaction.component.options.map(item =>
|
||||||
item.value.endsWith(id) ? item.label.match(decimalRegexp)![0] : null,
|
item.value.endsWith(`${id}`) ? item.label.match(decimalRegexp)![0] : null,
|
||||||
)
|
)
|
||||||
|
|
||||||
await db.learn.delete({
|
await db.learn.delete({
|
||||||
|
@ -48,6 +48,7 @@ class DeleteLearnHandler extends InteractionHandler {
|
||||||
title: '삭제',
|
title: '삭제',
|
||||||
description: `${Number(itemId!)}번을 정상적으로 삭제하ㅇ였어요.`,
|
description: `${Number(itemId!)}번을 정상적으로 삭제하ㅇ였어요.`,
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
|
color: this.container.embedColor,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
components: [],
|
components: [],
|
||||||
|
|
Loading…
Reference in a new issue