Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js')
- const bot = new Discord.Client();
- const token = 'Your Bots Token Here';
- bot.on('ready', () =>{
- console.log('Yo this is ready!');//informs you when the bot is online(in console)
- })
- bot.on('message', async message =>{
- if (message.content === ('hi')) {//this is what you will send/run
- message.channel.send('hello')//this what the bot will reply
- }
- },)
- bot.login(token);//the bot logins at the end
- //CTRL ~ to open terminal and node . or node index.js to open your bot and to close it do CTRL C
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement