mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 23:05:04 +02:00
Allow deleting reminders
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class DeleteReminderCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'delete-reminder',
|
||||
aliases: ['delete-remind', 'delete-timer', 'del-reminder', 'del-remind', 'del-timer'],
|
||||
group: 'remind',
|
||||
memberName: 'remind',
|
||||
description: 'Deletes your reminder.'
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
const exists = await this.client.timers.exists(msg.channel.id, msg.author.id);
|
||||
if (!exists) return msg.reply('You do not have a timer set in this channel.');
|
||||
await this.client.timers.deleteTimer(msg.channel.id, msg.author.id);
|
||||
return msg.say('🕰️ Your timer has been deleted.');
|
||||
}
|
||||
};
|
||||
@@ -7,7 +7,7 @@ module.exports = class RemindCommand extends Command {
|
||||
super(client, {
|
||||
name: 'remind',
|
||||
aliases: ['timer', 'remind-me'],
|
||||
group: 'other',
|
||||
group: 'remind',
|
||||
memberName: 'remind',
|
||||
description: 'Sets a reminder.',
|
||||
args: [
|
||||
Reference in New Issue
Block a user