mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
small example fixes
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* This bot responds to every "ping" message with a "pong".
|
||||
*/
|
||||
|
||||
var Discord = require( "discord.js" );
|
||||
var Discord = require( "../" );
|
||||
|
||||
// Create the bot
|
||||
var myBot = new Discord.Client();
|
||||
@@ -13,6 +13,12 @@ var myBot = new Discord.Client();
|
||||
// Login with an example email and password
|
||||
myBot.login( "hello@example.com", "password1" );
|
||||
|
||||
// The "ready" event is triggered after the bot successfully connected to
|
||||
// Discord and is ready to send messages.
|
||||
myBot.on( "ready", function() {
|
||||
console.log( "Bot connected successfully." );
|
||||
} );
|
||||
|
||||
// Add a listener to the "message" event, which triggers upon receiving
|
||||
// any message
|
||||
myBot.on( "message", function( message ) {
|
||||
|
||||
Reference in New Issue
Block a user