Created
November 19, 2022 20:47
-
-
Save joshdrumz/aad97af259b0419f48339fa11f64fd3c to your computer and use it in GitHub Desktop.
ABJ Detector Discord Bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Client, Events, GatewayIntentBits } = require('discord.js'); | |
const { token } = require('./config.json'); | |
const client = new Client({ | |
intents: [ | |
GatewayIntentBits.Guilds, | |
GatewayIntentBits.GuildMessages, | |
GatewayIntentBits.MessageContent | |
] | |
}); | |
client.on(Events.MessageCreate, message => { | |
console.log('message detected'); | |
if (message.author.bot || !message.guild) return; | |
// console.log(message); | |
const msgContent = message.content.toLowerCase(); | |
const user = message.author; | |
const appleBottomJeans = 'apple bottom jeans'.toLowerCase(); | |
const abj = 'abj'.toLowerCase(); | |
if (msgContent.includes(appleBottomJeans) || msgContent.includes(abj)) { | |
message.channel.send(`Come on now, really? You should be ashamed of yourself. <@${user.id}>`); | |
message.delete(); | |
} | |
}); | |
client.login(token); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment