const DiscordJS = require('discord.js')
const WOKCommands = require('wokcommands')
const path = require('path')
const { Intents } = DiscordJS
const client = new DiscordJS.Client({
// These intents are recommended for the built in help menu
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
client.on('ready', () => {
new WOKCommands(client, {
// The name of the local folder for your command files
commandsDir: path.join(__dirname, 'commands')
// Ran when a message is sent or updated
// NOTE: This is ran on the client and not the WOKCommands instance
client.on('messageUpsert', (message, oldMessage) => {
// oldMessage is undefined if it is a new message
// wasUpdated is now boolean true if it was an updated message
const wasUpdated = !!oldMessage
console.log(`The new content is ${message.content}.`)
client.login('YOUR TOKEN HERE')