Util for sending and deleting

This commit is contained in:
2025-04-10 15:50:25 -04:00
parent 235398d200
commit 7ca36a4938
9 changed files with 267 additions and 177 deletions

View File

@@ -1,7 +1,9 @@
const { sendCommandResponse } = require('../utils/messageUtils');
module.exports = {
name: 'help',
description: 'List all of my commands or info about a specific command.',
execute(message, args, deleteTimeout) {
async execute(message, args, deleteTimeout) {
let reply = '```';
reply += 'Here are the available commands:\n\n';
@@ -12,9 +14,7 @@ module.exports = {
reply += '```';
message.channel.send(reply).then(sentMessage => {
setTimeout(() => sentMessage.delete().catch(console.error), deleteTimeout);
});
await sendCommandResponse(message, reply, deleteTimeout, false);
},
};