Merge branch 'feature/cosmetic' into develop
This commit is contained in:
commit
445cd6b44e
7 changed files with 24 additions and 16 deletions
|
@ -17,12 +17,13 @@ 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-09-28')
|
||||
container.lastUpdated = new Date('2024-09-29')
|
||||
|
||||
if (release.startsWith('e')) {
|
||||
container.channel = 'EXPERIMENTAL'
|
||||
|
@ -78,6 +79,7 @@ declare module '@sapphire/framework' {
|
|||
config: Config
|
||||
channel: 'EXPERIMENTAL' | 'DEV' | 'PREVIEW' | 'RELEASE'
|
||||
lastUpdated: Date
|
||||
embedColor: number
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { ApplyOptions } from '@sapphire/decorators'
|
||||
import {
|
||||
Args,
|
||||
Command,
|
||||
|
@ -10,7 +11,6 @@ import {
|
|||
ComponentType,
|
||||
codeBlock,
|
||||
} from 'discord.js'
|
||||
import { ApplyOptions } from '@sapphire/decorators'
|
||||
|
||||
@ApplyOptions<Command.Options>({
|
||||
name: '삭제',
|
||||
|
@ -59,6 +59,7 @@ class DeleteLearnCommand extends Command {
|
|||
title: '삭제',
|
||||
description: `${codeBlock('md', deleteDataList.join('\n'))}`,
|
||||
timestamp: new Date().toISOString(),
|
||||
color: this.container.embedColor,
|
||||
},
|
||||
],
|
||||
components: [
|
||||
|
|
|
@ -35,6 +35,7 @@ class HelpCommand extends Command {
|
|||
footer: {
|
||||
text: `머핀봇 버전: ${this.container.version}`,
|
||||
},
|
||||
color: this.container.embedColor,
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
],
|
||||
|
|
|
@ -16,36 +16,39 @@ class InformationCommand extends Command {
|
|||
embeds: [
|
||||
{
|
||||
title: `${this.container.client.user?.username}의 정ㅂ보`,
|
||||
color: this.container.embedColor,
|
||||
fields: [
|
||||
{
|
||||
name: '구동ㅎ환경',
|
||||
value: `${platform()} ${arch()}`,
|
||||
value: `\`${platform()} ${arch()}\``,
|
||||
inline: false,
|
||||
},
|
||||
{
|
||||
name: '버ㅈ전',
|
||||
value: this.container.version,
|
||||
value: `\`${this.container.version}\``,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: '채ㄴ널',
|
||||
value: this.container.channel.toLowerCase(),
|
||||
value: `\`${this.container.channel.toLowerCase()}\``,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: '최근 업ㄷ데이트 날짜',
|
||||
value: this.container.lastUpdated.toLocaleDateString('ko', {
|
||||
value: `\`${this.container.lastUpdated.toLocaleDateString('ko', {
|
||||
dateStyle: 'long',
|
||||
}),
|
||||
})}\``,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: '개ㅂ발자',
|
||||
value: (
|
||||
await this.container.client.users.fetch(
|
||||
this.container.config.bot.owner_ID,
|
||||
)
|
||||
).username,
|
||||
value: `\`${
|
||||
(
|
||||
await this.container.client.users.fetch(
|
||||
this.container.config.bot.owner_ID,
|
||||
)
|
||||
).username
|
||||
}\``,
|
||||
inline: false,
|
||||
},
|
||||
],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Command, container } from '@sapphire/framework'
|
||||
import { ApplyOptions } from '@sapphire/decorators'
|
||||
import { Message, codeBlock } from 'discord.js'
|
||||
import { Command, container } from '@sapphire/framework'
|
||||
|
||||
@ApplyOptions<Command.Options>({
|
||||
name: '리스트',
|
||||
|
@ -36,7 +36,7 @@ class ListCommand extends Command {
|
|||
'md',
|
||||
list.map(item => `- ${item}`).join('\n'),
|
||||
)}`,
|
||||
color: 0x0000ff,
|
||||
color: this.container.embedColor,
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
],
|
||||
|
|
|
@ -33,7 +33,7 @@ class DeleteLearnHandler extends InteractionHandler {
|
|||
const decimalRegexp = /^[0-9]/g
|
||||
|
||||
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({
|
||||
|
@ -48,6 +48,7 @@ class DeleteLearnHandler extends InteractionHandler {
|
|||
title: '삭제',
|
||||
description: `${Number(itemId!)}번을 정상적으로 삭제하ㅇ였어요.`,
|
||||
timestamp: new Date().toISOString(),
|
||||
color: this.container.embedColor,
|
||||
},
|
||||
],
|
||||
components: [],
|
||||
|
|
|
@ -8,6 +8,6 @@ export default class MAAConfig {
|
|||
}
|
||||
|
||||
public readonly train = {
|
||||
user_id: process.env.TRAIN_USER_ID!,
|
||||
user_ID: process.env.TRAIN_USER_ID!,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue