Commands Templates
Default Templates
Example of Usage
const mySlowTask = require('./mySlowTask.js');
module.exports = class MyCommand extends SlowCommand {
name = 'test';
async run(ctx) {
const message = ctx.send("Please wait a bit while I'm performing the task.");
await this.startWait(message);
await ctx.deleteMessage();
const result = await mySlowTask();
await this.stopWait(message);
await message.edit(result);
}
}Last updated