Added authentication for examples and moved promise

This commit is contained in:
hydrabolt
2015-08-30 16:31:21 +01:00
parent c2e282c813
commit d8b7365e1f
2 changed files with 10 additions and 2 deletions

6
examples/auth.json Normal file
View File

@@ -0,0 +1,6 @@
{
//this is an authentication file used for the examples,
//just add your email and password and the examples should work!
"email" : "discord@js.com",
"password" : "my discord password"
}

View File

@@ -375,8 +375,8 @@ class Client {
deleteMessage(message, timeout, callback = function (err, msg) { }) {
var self = this;
return new Promise(function (resolve, reject) {
var prom = new Promise(function (resolve, reject) {
if (timeout) {
setTimeout(remove, timeout)
} else {
@@ -398,6 +398,8 @@ class Client {
});
}
});
return prom;
}
updateMessage(message, content, callback = function (err, msg) { }) {