mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
Added the new gateway capability
This commit is contained in:
12
test/bot.js
12
test/bot.js
@@ -7,8 +7,16 @@ var mybot = new Discord.Client();
|
||||
|
||||
var server, channel, message, sentMessage = false;
|
||||
|
||||
function success1(){ //make server
|
||||
function init(){
|
||||
console.log("preparing...");
|
||||
}
|
||||
|
||||
mybot.on("ready", function(){
|
||||
console.log("ready! beginning tests");
|
||||
success1();
|
||||
});
|
||||
|
||||
function success1(){ //make server
|
||||
mybot.createServer("test-server", "london").then(success2).catch(error);
|
||||
}
|
||||
|
||||
@@ -123,4 +131,4 @@ mybot.on("message", function(message){
|
||||
|
||||
});
|
||||
|
||||
mybot.login(process.env["ds_email"], process.env["ds_password"]).then(success1).catch(error);
|
||||
mybot.login(process.env["ds_email"], process.env["ds_password"]).then(init).catch(error);
|
||||
Reference in New Issue
Block a user