Files
xiao/commands/games-mp/chess-delete.js
T
Dragon Fire c61ae11679 Fix
2021-06-05 12:50:41 -04:00

21 lines
626 B
JavaScript

const Command = require('../../framework/Command');
module.exports = class ChessDeleteCommand extends Command {
constructor(client) {
super(client, {
name: 'chess-delete',
aliases: ['delete-chess', 'chess-del', 'del-chess'],
group: 'games-mp',
memberName: 'chess-delete',
description: 'Deletes your saved Chess game.'
});
}
async run(msg) {
const data = await this.client.redis.exists(`chess-${msg.author.id}`);
if (!data) return msg.reply('You do not have a saved Chess game.');
await this.client.redis.del(`chess-${msg.author.id}`);
return msg.say('Your saved game has been deleted.');
}
};