Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

discord.js

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:
ADD COMMENT
Topic
Name
2+8 =