1 const Discord = require("discord.js")
2 const common = require("./common.js")
4 const client = module.exports = new Discord.Client({
5 intents: [Discord.GatewayIntentBits.Guilds, Discord.GatewayIntentBits.GuildMessages]
8 client.login(process.env.DISCORD_TOKEN)
13 operators: common.storageLoad("operators") || [],
14 ignored: common.storageLoad("ignored") || [],
17 client.on("messageCreate", msg => {
18 if (msg.author.id != client.user.id && msg.content.startsWith("!") && !fb.ignored[msg.author.id]) {
19 let args = msg.content.slice(1).split(" ")
20 let cmd = args.shift()
21 let def = fb.commands[cmd]
24 if (def.operator && !fb.operators[msg.author.id])
25 msg.reply(`Sorry, you need to be an operator run this command: ${cmd}`)
27 def.func(msg, args, fb)
29 msg.reply(`Invalid command: ${cmd}`)
34 //const modules = ["nsfw", "random"]
35 const modules = ["basic", "bullshit", "marriage", "http", "roleplay", "death", "economy", "waifu", "operator"]
37 for (let f of modules) {
38 let m = require(`./${f}.js`)