Fix bug in portal, cleverbot group

This commit is contained in:
Dragon Fire
2021-04-18 08:33:03 -04:00
parent c6996cccdf
commit 09924d6973
5 changed files with 16 additions and 14 deletions
+1
View File
@@ -45,6 +45,7 @@ client.registry
['remind', 'Reminders'],
['phone', 'Phone'],
['code', 'Coding Tools'],
['cleverbot', 'Cleverbot'],
['other', 'Other'],
['roleplay', 'Roleplay']
])
@@ -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.`);
}
@@ -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: [
+1 -1
View File
@@ -39,7 +39,7 @@ module.exports = class PortalSendCommand extends Command {
channel => channel.guild && channel.topic && channel.topic.includes('<xiao:portal>')
);
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...');
+11 -11
View File
@@ -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",