mirror of
https://github.com/danbulant/discord.js
synced 2026-07-07 12:11:11 +00:00
Added authentication for examples and moved promise
This commit is contained in:
parent
c2e282c813
commit
d8b7365e1f
2 changed files with 10 additions and 2 deletions
6
examples/auth.json
Normal file
6
examples/auth.json
Normal 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"
|
||||||
|
}
|
||||||
|
|
@ -375,8 +375,8 @@ class Client {
|
||||||
deleteMessage(message, timeout, callback = function (err, msg) { }) {
|
deleteMessage(message, timeout, callback = function (err, msg) { }) {
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
var prom = new Promise(function (resolve, reject) {
|
||||||
if (timeout) {
|
if (timeout) {
|
||||||
setTimeout(remove, timeout)
|
setTimeout(remove, timeout)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -398,6 +398,8 @@ class Client {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return prom;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateMessage(message, content, callback = function (err, msg) { }) {
|
updateMessage(message, content, callback = function (err, msg) { }) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue