Use sendTyping for all commands

This commit is contained in:
Dragon Fire
2024-08-11 17:57:59 -04:00
parent 6139fccfb5
commit b8666207d1
3 changed files with 2 additions and 2 deletions
-1
View File
@@ -33,7 +33,6 @@ module.exports = class CleverbotCommand extends Command {
} }
const cleverbot = new Cleverbot(this.client, msg.channel.id, msg.author.id); const cleverbot = new Cleverbot(this.client, msg.channel.id, msg.author.id);
if (text) { if (text) {
msg.channel.sendTyping().catch(() => null);
try { try {
const response = await cleverbot.respond(text); const response = await cleverbot.respond(text);
return msg.reply(response); return msg.reply(response);
+1
View File
@@ -71,6 +71,7 @@ module.exports = class CommandClient extends Client {
} }
if (!this.dispatcher.isCommand(msg)) return; if (!this.dispatcher.isCommand(msg)) return;
await msg.channel.sendTyping();
const parsed = await this.dispatcher.parseMessage(msg); const parsed = await this.dispatcher.parseMessage(msg);
if (parsed.error) { if (parsed.error) {
const helpUsage = this.registry.commands.get('help').usage(parsed.command.name); const helpUsage = this.registry.commands.get('help').usage(parsed.command.name);
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "xiao", "name": "xiao",
"version": "152.1.0", "version": "152.2.0",
"description": "Your personal server companion.", "description": "Your personal server companion.",
"main": "Xiao.js", "main": "Xiao.js",
"scripts": { "scripts": {