diff --git a/examples/auth.json b/examples/auth.json new file mode 100644 index 000000000..ce847c692 --- /dev/null +++ b/examples/auth.json @@ -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" +} \ No newline at end of file diff --git a/src/Client.js b/src/Client.js index 382f0d4f3..8e2159b1d 100644 --- a/src/Client.js +++ b/src/Client.js @@ -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) { }) {