Created
May 6, 2018 20:38
-
-
Save kiramishima/bcc45270217ee274a90fb34f7680e70b to your computer and use it in GitHub Desktop.
Creando Bots para Discord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Discord = require('discord.js'); | |
const client = new Discord.Client(); | |
client.on('ready', () => { | |
console.log(`Logged in as ${client.user.tag}!`); | |
}); | |
client.on('message', msg => { | |
if (msg.content === 'ping') { | |
msg.reply('Pong!'); | |
} | |
}); | |
client.login('<token>'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment