mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
Added authentication for examples and moved promise
This commit is contained in:
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) { }) {
|
||||||
|
|||||||
Reference in New Issue
Block a user