im creating a Discord bot for my server but when i try to make the bot run nothing happens here is what my code looks like enter image description here
const Discord = require('discord.js');
const client = new Discord.Client();
client.once('ready', () => {
console.log('Bot is online')
});
client.login('MY TOKEN');
I'm assuming you are on v12 because discord.js should automatically throw an error if no intents are specified in the options. As seen in their repo right here.
So you should update to the latest version (v13.x.x) using npm install discord.js@latest
.
This requires Node v16.6.0+ so make sure you have that installed.
If this still persists, please consider joining the support server for further help.
I just noticed that you haven't saved the file.
Hit CTRL+S to save it.