const bot = require("./bot") const { Client, Events, GatewayIntentBits } = require("discord.js") const token = process.env.BOT_TOKEN const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent ] }) client.once(Events.ClientReady, readyClient => { console.log("Tetobot is ready! Logged in as " + readyClient.user.tag) }) client.on(Events.MessageCreate, message => { if (message.author != client.id) { bot.message(message) } }) client.login(token)