Last active
December 14, 2016 05:18
-
-
Save appellation/92af6a505beee4c4fad7137ea3e4473a to your computer and use it in GitHub Desktop.
Literally the simplest Discord bot.
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
{ | |
"token": "test token" | |
} |
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 config = require('./config.json'); | |
const client = new Discord.client(); | |
client.on('message', msg => { | |
console.log(`[${msg.createdAt}] ${msg.author}: ${msg.content}`); | |
}); | |
client.login(config.token); |
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
{ | |
"name": "test-bot", | |
"dependencies": { | |
"discord.js": "^10.0.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment