Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Discord Bot Javascript

const Discord = require('discord.js');

const DISCORD_SECRET = "put bot token here";

const client = new Discord.Client();

client.on('message', msg => {
  if (msg.content === 'ping') {
    msg.reply('pong');
  }
});

client.login(DISCORD_SECRET);
 
PREVIOUS NEXT
Tagged: #Discord #Bot #Javascript
ADD COMMENT
Topic
Name
2+7 =