mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 04:31:05 +00:00
Make destroy return a promise
This commit is contained in:
parent
9c8e6eed24
commit
8571723ec1
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ export default class Client extends EventEmitter {
|
||||||
|
|
||||||
// def destroy
|
// def destroy
|
||||||
destroy(callback = (/*err, {}*/) => { }) {
|
destroy(callback = (/*err, {}*/) => { }) {
|
||||||
this.internal.logout()
|
return this.internal.logout()
|
||||||
.then(() => this.internal.disconnected(true))
|
.then(() => this.internal.disconnected(true))
|
||||||
.then(dataCallback(callback), errorCallback(callback));
|
.then(dataCallback(callback), errorCallback(callback));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue