From 85f7200e499459d059e3a537a5e3e9bb4ce305b5 Mon Sep 17 00:00:00 2001 From: Jimi Date: Sat, 26 Nov 2022 22:01:48 +0100 Subject: [PATCH] Bug fix #2 Removed the sexbot-chat and sexbot-ai feature from the help panel. Made it so people don't have to mention sexbot to talk on dms. Cat commands still aren't working. --- functions/Help.js | 2 +- index.js | 24 +++--------------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/functions/Help.js b/functions/Help.js index 9ad7d80..eda2ee6 100644 --- a/functions/Help.js +++ b/functions/Help.js @@ -9,7 +9,7 @@ module.exports = async (message, author, guild, client) => { .setDescription("sexbot is a dumb chatbot that acts like an average discord user.") .addField("» How to use?", 'To talk with me, you just need to mention me in a message.') .addField("» \"Sexbot is too dumb\" - :nerd:", 'Want a more "intelligent" version of sexbot? Mention me and add `chatai` at the beginning of your message.') - .addField('» "I don\'t want to mention all the time\" - :nerd:', "You can talk with me on DM's, or create a channel that contains 'sexbot-chat'.") + .addField('» "I don\'t want to mention all the time\" - :nerd:', "You can talk with me on DM's.") .addField("» \"I know how to make sexbot better\" - :nerd:", "We love to hear that! You can [contribute on Github](https://github.com/thejimi/sexbot) :heart:") const embedcommands = new Discord.MessageEmbed() diff --git a/index.js b/index.js index 8900726..bcb6571 100644 --- a/index.js +++ b/index.js @@ -38,30 +38,12 @@ client.on("message", async (message) => { return Help(message, message.author, message.guild, client) } - if (message.mentions.has(client.user)) { //Continue if a message mentioned the bot. + if(!message.guild){ return DetectMessageType(message, message.author, message.guild, client) } - if (message.channel.name.includes('sexbot-ai')){ - return ChatAI(message, message.author, message.guild, client) - } - - if (message.channel.name.includes('sexbot-chat')){ - var response = await AI(message.content,message.author.username) - - if(message.guild){ - message.channel.startTyping(); - setTimeout(function(){ - message.channel.stopTyping(); - return message.lineReply(response) - }, 2000); - } else { - message.channel.startTyping(); - setTimeout(function(){ - message.channel.stopTyping(); - return message.channel.send(response) - }, 2000); - } + if (message.mentions.has(client.user)) { //Continue if a message mentioned the bot. + return DetectMessageType(message, message.author, message.guild, client) } });