mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 08:41:29 +00:00
small fix required to change
This commit is contained in:
parent
8a765e0015
commit
dfe1a85c6e
1 changed files with 11 additions and 3 deletions
|
|
@ -11,9 +11,9 @@ var BotConfig = require( "./config.json" );
|
||||||
var hydrabot = new Discord.Client();
|
var hydrabot = new Discord.Client();
|
||||||
|
|
||||||
// Log the client in using the auth details in config.json
|
// Log the client in using the auth details in config.json
|
||||||
hydrabot.login( BotConfig.email, BotConfig.password+"a" );
|
hydrabot.login( BotConfig.email, BotConfig.password );
|
||||||
|
|
||||||
console.log("Starting up...");
|
console.log( "Starting up..." );
|
||||||
|
|
||||||
// When the bot is ready to go, output to the console
|
// When the bot is ready to go, output to the console
|
||||||
hydrabot.on( "ready", function() {
|
hydrabot.on( "ready", function() {
|
||||||
|
|
@ -22,5 +22,13 @@ hydrabot.on( "ready", function() {
|
||||||
|
|
||||||
// When the bot gets disconnected, exit.
|
// When the bot gets disconnected, exit.
|
||||||
hydrabot.on( "disconnected", function( obj ) {
|
hydrabot.on( "disconnected", function( obj ) {
|
||||||
console.log( "Disconnected", obj.reason );
|
// Say we couldn't connect and then exit
|
||||||
|
console.log( "Disconnected - " + obj.reason );
|
||||||
|
process.exit( 0 );
|
||||||
|
} );
|
||||||
|
|
||||||
|
hydrabot.on( "message", function( message ) {
|
||||||
|
|
||||||
|
console.log( message );
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue