mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
refactor(*): use async functions (#6210)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user