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) } });