feat: Add unfinished purge message command

This commit is contained in:
2024-03-04 23:04:32 +07:00
parent 896dbc70d5
commit fa0c9e1ea0
5 changed files with 280 additions and 3 deletions
+5
View File
@@ -44,6 +44,11 @@ export const GLOBAL_COMMANDS: Object[] = [
option.setName('message').setDescription('Message you want me to say').setRequired(true)
),
new SlashCommandBuilder()
.setName('purge')
.setDescription('Purge messages')
.addStringOption((option) => option.setName('message').setDescription('Amount to purge').setRequired(true)),
new SlashCommandBuilder()
.setName('osu')
.setDescription('Interact with the game osu!')
+2 -3
View File
@@ -152,9 +152,8 @@ export async function sendMessage(
else message = await channel.send(options);
} catch (error) {
if (typeof user === 'undefined') {
return Logger.error(
`Cannot find available destinations to send the message CID: ${channel.id} C_ERR: ${error}`
);
Logger.error(`Cannot find available destinations to send the message CID: ${channel.id} C_ERR: ${error}`);
return;
}
try {
message = await user.send(options);