mirror of
https://github.com/1disk/edp445.git
synced 2024-08-14 22:47:02 +00:00
85f7200e49
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.
50 lines
No EOL
1.9 KiB
JavaScript
50 lines
No EOL
1.9 KiB
JavaScript
const { Client, Intents, Collection, MessageEmbed, MessageActionRow, MessageButton, DiscordAPIError } = require('discord.js'); //Import the most important functions from discord.js
|
|
const Discord = require('discord.js'); //v12.5.3
|
|
require('discord-inline-reply'); //Import inline replies
|
|
const client = new Client(); //New Discord client
|
|
const botconfig = require('./data/botconfig.json') //Login info for the bot, you will have to provide your own info there
|
|
|
|
client.on("ready", () => {
|
|
console.log(`The bot is online!`)
|
|
|
|
client.user.setActivity(`${client.guilds.cache.size} servers • discord.gg/memee`, {
|
|
type: "WATCHING"
|
|
});
|
|
});
|
|
|
|
client.on("guildCreate", function(guild){
|
|
client.user.setActivity(`${client.guilds.cache.size} servers • discord.gg/memee`, {
|
|
type: "WATCHING"
|
|
});
|
|
});
|
|
|
|
client.on("message", async (message) => {
|
|
const DetectMessageType = require('./functions/!DetectMessageType.js')
|
|
const ChatAI = require('./functions/cleverbot.js')
|
|
const AI = require('./functions/AI.js')
|
|
const Help = require('./functions/Help.js')
|
|
|
|
if(message.author.id === client.user.id){
|
|
return; //Stop the event if a message is sent by the bot.
|
|
}
|
|
if (message.content.includes("@everyone")) {
|
|
return; //Stop the event if a message includes @everyone ping.
|
|
}
|
|
if (message.content.includes("@here")) {
|
|
return; //Stop the event if a message includes @here ping.
|
|
}
|
|
|
|
if (message.content.includes("!shelp")){
|
|
return Help(message, message.author, message.guild, client)
|
|
}
|
|
|
|
if(!message.guild){
|
|
return DetectMessageType(message, message.author, message.guild, client)
|
|
}
|
|
|
|
if (message.mentions.has(client.user)) { //Continue if a message mentioned the bot.
|
|
return DetectMessageType(message, message.author, message.guild, client)
|
|
}
|
|
});
|
|
|
|
client.login(botconfig.token) |