javascript bot

Solutions on MaxInterview for javascript bot by the best coders in the world

showing results for - "javascript bot"
Conor
13 Jan 2020
1/*       
2	Discord ? 
3    			okay...
4
5*/
6  
7const Discord = require('discord.js'); //$npm i discord.js
8const client = new Discord.Client();
9
10client.on('ready', () => {
11  console.log(`Logged in as ${client.user.tag}!`);
12});
13
14client.on('message', msg => {
15  if (msg.content === 'ping') {
16    msg.reply('Pong!');
17  }
18});
19
20client.login('token'); // https://discord.com/developers/applications