const Discord = require("discord.js")
const common = require("./common.js")
+const copypasta = require("./copypasta.json")
+const copypastaTrigger = require("./copypasta.js")
const client = module.exports = new Discord.Client({
- intents: [Discord.GatewayIntentBits.Guilds, Discord.GatewayIntentBits.GuildMessages]
+ intents: [Discord.GatewayIntentBits.Guilds, Discord.GatewayIntentBits.GuildMessages, Discord.GatewayIntentBits.GuildVoiceStates]
})
client.login(process.env.DISCORD_TOKEN)
ignored: common.storageLoad("ignored") || [],
}
+
+client.on("ready", _ => client.user.setActivity("Leftist propaganda"))
+
client.on("messageCreate", msg => {
- if (msg.author.id != client.user.id && msg.content.startsWith("!") && !fb.ignored[msg.author.id]) {
- let args = msg.content.slice(1).split(" ")
+ if (fb.ignored[msg.author.id] || msg.author.id == client.user.id)
+ return;
+
+ const trigger = copypastaTrigger(msg.content.toLowerCase())
+ if (trigger)
+ return msg.reply(copypasta[trigger])
+
+ if (msg.content.startsWith("!")) {
+ let args = msg.content.replace(/@/g, "\\@").slice(1).split(" ")
let cmd = args.shift()
let def = fb.commands[cmd]
}
})
-//const modules = ["nsfw", "random", "http", "operator"]
-const modules = ["basic", "bullshit", "marriage", "http", "roleplay", "death", "economy", "waifu"]
+const modules = ["basic", "bullshit", "marriage", "http", "roleplay", "death", "economy", "waifu", "operator", "nsfw", "random", "music", "badapple"]
for (let f of modules) {
let m = require(`./${f}.js`)