mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Use sendTyping for all commands
This commit is contained in:
@@ -33,7 +33,6 @@ module.exports = class CleverbotCommand extends Command {
|
||||
}
|
||||
const cleverbot = new Cleverbot(this.client, msg.channel.id, msg.author.id);
|
||||
if (text) {
|
||||
msg.channel.sendTyping().catch(() => null);
|
||||
try {
|
||||
const response = await cleverbot.respond(text);
|
||||
return msg.reply(response);
|
||||
|
||||
@@ -71,6 +71,7 @@ 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) {
|
||||
const helpUsage = this.registry.commands.get('help').usage(parsed.command.name);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "152.1.0",
|
||||
"version": "152.2.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user