So, my bot doesnt turn on it also doesnt send a message in the terminal that he is online i cant see any bugs in the terminal either he worked just fine and suddenly stopped working. also when made a new project the bot also wouldnt start
const Discord = require(‘discord.js’);
const bot = new Discord.Client();
const token = ‘My discord token’;
var version = ‘1.0.1’;
const PREFIX = ‘$’;
bot.on(‘ready’, () =>{
console.log('i am ready!');
})
bot.on(‘message’, message =>{
let args = message.content.substring(PREFIX.length).split(" ");
switch(args[0]){
case 'ping' :
message.channel.send('pong');
break;
case 'developer,Developer' :
message.channel.send('Revenge#6897 add me')
break;
case 'info' :
if(args[1] === 'version'){
message.channel.send('Version'+ version);
}else{
message.channel.send('invalid args')
}
break;
}
}
Ive just tried this and it also doesnt seem to work
other bots that i made stopped working too
i dont know if this makes any difference but im making the bot in visual studio code and when i type ‘’ node . ‘’ to start it it doesnt become yellow like it did before, once again i dont know if that changes anything since this is my first discord bot that im making (overall first thing that im trying to code)
Thanks i will do some research on that matter, for now i will just try to make some simple commands, i want the bot to be able to do like everything that you need, reaction roles, role management with custom commands and all that good stuff