mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
small fixes
This commit is contained in:
@@ -4,8 +4,6 @@
|
|||||||
var Discord = require( "../" );
|
var Discord = require( "../" );
|
||||||
exports.Discord = Discord;
|
exports.Discord = Discord;
|
||||||
|
|
||||||
exports.LOL = "CHING CHONG UNTOUCHED";
|
|
||||||
|
|
||||||
// Load the config file. If you have not already, make one that follows the
|
// Load the config file. If you have not already, make one that follows the
|
||||||
// structure : { "email" : "discordEmail", "password" : "discordPassword" }
|
// structure : { "email" : "discordEmail", "password" : "discordPassword" }
|
||||||
var BotConfig = require( "./config.json" );
|
var BotConfig = require( "./config.json" );
|
||||||
@@ -30,9 +28,11 @@ hydrabot.login( BotConfig.email, BotConfig.password );
|
|||||||
|
|
||||||
console.log( "Starting up..." );
|
console.log( "Starting up..." );
|
||||||
|
|
||||||
|
var time = Date.now();
|
||||||
|
|
||||||
// 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() {
|
||||||
console.log( "Ready!" );
|
console.log( "Ready in "+ (Date.now() - time) +"ms!" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// When the bot gets disconnected, exit.
|
// When the bot gets disconnected, exit.
|
||||||
|
|||||||
4
index.js
4
index.js
@@ -78,6 +78,10 @@ exports.Client.prototype.cacheServer = function( id, cb, members ) {
|
|||||||
.set( "authorization", self.token )
|
.set( "authorization", self.token )
|
||||||
.end( function( err, res ) {
|
.end( function( err, res ) {
|
||||||
|
|
||||||
|
if(err){
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
|
||||||
var channelList = res.body;
|
var channelList = res.body;
|
||||||
for ( channel of channelList ) {
|
for ( channel of channelList ) {
|
||||||
server.channels.add( new Channel( channel, server ) );
|
server.channels.add( new Channel( channel, server ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user