diff --git a/Xiao.js b/Xiao.js index 2b117886..11a8292c 100644 --- a/Xiao.js +++ b/Xiao.js @@ -45,6 +45,7 @@ client.registry ['remind', 'Reminders'], ['phone', 'Phone'], ['code', 'Coding Tools'], + ['cleverbot', 'Cleverbot'], ['other', 'Other'], ['roleplay', 'Roleplay'] ]) diff --git a/commands/other/cleverbot-end.js b/commands/cleverbot/cleverbot-end.js similarity index 91% rename from commands/other/cleverbot-end.js rename to commands/cleverbot/cleverbot-end.js index 5b45c23d..02956ae5 100644 --- a/commands/other/cleverbot-end.js +++ b/commands/cleverbot/cleverbot-end.js @@ -5,7 +5,7 @@ module.exports = class CleverbotEndCommand extends Command { super(client, { name: 'cleverbot-end', aliases: ['clevs-end', 'chat-end'], - group: 'other', + group: 'cleverbot', memberName: 'cleverbot-end', description: 'Ends the current Cleverbot chat.' }); @@ -14,6 +14,7 @@ module.exports = class CleverbotEndCommand extends Command { run(msg) { const cleverbot = this.client.cleverbots.get(msg.channel.id); if (!cleverbot) return msg.say('There is not a Cleverbot conversation in this channel.'); + clearTimeout(cleverbot.timeout); this.client.cleverbots.delete(msg.channel.id); return msg.reply(`Ended the current conversation. Chatted **${cleverbot.interactions}** times.`); } diff --git a/commands/other/cleverbot.js b/commands/cleverbot/cleverbot.js similarity index 97% rename from commands/other/cleverbot.js rename to commands/cleverbot/cleverbot.js index 65c2dcd6..44eba802 100644 --- a/commands/other/cleverbot.js +++ b/commands/cleverbot/cleverbot.js @@ -7,7 +7,7 @@ module.exports = class CleverbotCommand extends Command { super(client, { name: 'cleverbot', aliases: ['clevs', 'chat'], - group: 'other', + group: 'cleverbot', memberName: 'cleverbot', description: 'Starts a Cleverbot conversation.', credit: [ diff --git a/commands/other/portal-send.js b/commands/other/portal-send.js index 7d278ff0..1b54ec46 100644 --- a/commands/other/portal-send.js +++ b/commands/other/portal-send.js @@ -39,7 +39,7 @@ module.exports = class PortalSendCommand extends Command { channel => channel.guild && channel.topic && channel.topic.includes('') ); if (msg.guild) channels = channels.filter(channel => !msg.guild.channels.cache.has(channel.id)); - if (message.toLowerCase() === 'count') { + if (message && message.toLowerCase() === 'count') { return msg.say(`**${this.portalEmoji} ${channels.size}** currently open portals.`); } if (!channels.size) return msg.reply('No channels have an open portal...'); diff --git a/package.json b/package.json index 0ab9e72b..f63775f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "134.16.3", + "version": "134.17.0", "description": "Your personal server companion.", "main": "Xiao.js", "private": true, @@ -34,23 +34,23 @@ "dependencies": { "@discordjs/collection": "^0.1.6", "@discordjs/opus": "^0.5.0", - "@tensorflow/tfjs-node": "^3.3.0", - "@vitalets/google-translate-api": "^5.1.0", + "@tensorflow/tfjs-node": "^3.4.0", + "@vitalets/google-translate-api": "^7.0.0", "aki-api": "^5.2.1", "bombsweeper.js": "^1.0.1", "canvas": "^2.7.0", - "cheerio": "^1.0.0-rc.5", + "cheerio": "1.0.0-rc.6", "cloc": "^2.7.0", "common-tags": "^1.8.0", "connect4-ai": "^0.1.3", - "csv-parse": "^4.15.3", + "csv-parse": "^4.15.4", "custom-translate": "^2.2.8", "didyoumean2": "^4.1.0", "discord.js": "^12.5.3", "discord.js-commando": "github:discordjs/Commando", "dotenv": "^8.2.0", "emoji-regex": "^9.2.2", - "eslint": "^7.23.0", + "eslint": "^7.24.0", "expr-eval": "^2.0.2", "fen-validator": "^1.4.1", "font-finder": "^1.1.0", @@ -58,17 +58,17 @@ "gm": "^1.23.1", "html-entities": "^2.3.2", "image-to-ascii": "^3.0.13", - "ioredis": "^4.25.0", - "js-beautify": "^1.13.5", + "ioredis": "^4.26.0", + "js-beautify": "^1.13.13", "js-chess-engine": "^0.11.3", "jszip": "^3.6.0", "kuroshiro": "^1.1.2", "kuroshiro-analyzer-kuromoji": "^1.1.0", - "mathjs": "^9.3.0", + "mathjs": "^9.3.2", "moment": "^2.29.1", "moment-duration-format": "^2.3.2", "moment-timezone": "^0.5.33", - "node-superfetch": "^0.2.1", + "node-superfetch": "^0.2.2", "nsfwjs": "^2.4.0", "parse-domain": "^3.0.3", "pokersolver": "^2.1.4", @@ -81,7 +81,7 @@ "text-diff": "^1.0.1", "tictactoe-minimax-ai": "^1.2.1", "twemoji-parser": "^13.0.0", - "user-agents": "^1.0.611", + "user-agents": "^1.0.626", "valid-url": "^1.0.9", "wavefile": "^11.0.0", "winston": "^3.3.3",