Add option to not send typing status

This commit is contained in:
Dragon Fire
2025-04-13 14:28:21 -04:00
parent f35794eefc
commit c64e919c14
5 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -71,9 +71,9 @@ module.exports = class CommandClient extends Client {
}
if (!this.dispatcher.isCommand(msg)) return;
await msg.channel.sendTyping();
const parsed = await this.dispatcher.parseMessage(msg);
if (parsed.error) {
await msg.channel.sendTyping();
const helpUsage = this.registry.commands.get('help').usage(parsed.command.name);
await msg.reply(stripIndents`
${parsed.error}
@@ -84,6 +84,7 @@ module.exports = class CommandClient extends Client {
return;
}
const { command, args } = parsed;
if (command.sendTyping) await msg.channel.sendTyping();
if (msg.guild && command.clientPermissions.length) {
for (const permission of command.clientPermissions) {
if (msg.channel.permissionsFor(this.user).has(permission)) continue;