refactor(*): use async functions (#6210)

This commit is contained in:
Sugden
2021-08-02 00:47:43 +01:00
committed by GitHub
parent 626ff85ae7
commit e2e4f6518b
29 changed files with 298 additions and 399 deletions

View File

@@ -637,8 +637,9 @@ class Message extends Base {
* .then(console.log)
* .catch(console.error)
*/
pin() {
return this.channel.messages.pin(this.id).then(() => this);
async pin() {
await this.channel.messages.pin(this.id);
return this;
}
/**
@@ -650,8 +651,9 @@ class Message extends Base {
* .then(console.log)
* .catch(console.error)
*/
unpin() {
return this.channel.messages.unpin(this.id).then(() => this);
async unpin() {
await this.channel.messages.unpin(this.id);
return this;
}
/**