You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
492 B

const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log('I am ready!');
});
client.on('message', message => {
if (message.content === 'ping') {
message.reply('pong');
}
});
client.on('message', message => {
if (message.content === 'test') {
message.reply('it worked...');
}
});
setTimeout(function() { message("my message"); }, 100);
// THIS MUST BE THIS WAY
client.login(process.env.BOT_TOKEN);