diff --git a/src/init.ts b/src/init.ts index 3c0fd7f..0b1f0b6 100644 --- a/src/init.ts +++ b/src/init.ts @@ -1,6 +1,7 @@ import { Config } from './config' import { ReleaseChannel } from './lib/releaseChannel' import { container } from '@sapphire/pieces' +import type { Client } from 'dokdo' import { connect, disconnect } from 'mongoose' declare module '@sapphire/pieces' { @@ -15,8 +16,8 @@ declare module '@sapphire/pieces' { success: number } channel: ReleaseChannel - } dokdo: Client + } } declare module '@sapphire/framework' { @@ -29,7 +30,7 @@ declare module '@sapphire/framework' { container.dbDisconnect = async () => await disconnect() container.config = new Config() container.prefix = container.config.bot.prefix -container.version = '5.0.0-yogurt_canary.250308b' +container.version = '5.0.0-yogurt_canary.250309a' container.embedColors = { default: 0xaddb87, fail: 0xff0000, diff --git a/src/interaction-handlers/deleteLearnedData.ts b/src/interaction-handlers/deleteLearnedData.ts index 6442fa2..28e3644 100644 --- a/src/interaction-handlers/deleteLearnedData.ts +++ b/src/interaction-handlers/deleteLearnedData.ts @@ -19,6 +19,14 @@ export default class DeleteLearnedDataHandler extends InteractionHandler { public async parse( interaction: StringSelectMenuInteraction | ButtonInteraction, ) { + if ( + !interaction.customId.startsWith( + MuffinCustomId.DeleteLearnedDataCancel, + ) || + !interaction.customId.startsWith(MuffinCustomId.DeleteLearnedDataUserId) + ) + return this.none() + const userId = interaction.isButton() ? interaction.customId.slice( MuffinCustomId.DeleteLearnedDataCancel.length, diff --git a/src/listeners/ready.ts b/src/listeners/ready.ts index 3056e9b..db62cd8 100644 --- a/src/listeners/ready.ts +++ b/src/listeners/ready.ts @@ -13,6 +13,7 @@ export default class ClientReadyListener extends Listener { owners: [this.container.config.bot.ownerId], secrets: [this.container.config.databaseUrl], aliases: ['dokdo', 'dok', 'Dokdo', 'Dok', '테스트'], + globalVariable: { container: this.container }, noPerm: async msg => await msg.reply({ content: '당신은 내 제작자가 아니잖아!',