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:
@@ -140,14 +140,10 @@ class GuildPreview extends Base {
|
||||
* Fetches this guild.
|
||||
* @returns {Promise<GuildPreview>}
|
||||
*/
|
||||
fetch() {
|
||||
return this.client.api
|
||||
.guilds(this.id)
|
||||
.preview.get()
|
||||
.then(data => {
|
||||
this._patch(data);
|
||||
return this;
|
||||
});
|
||||
async fetch() {
|
||||
const data = await this.client.api.guilds(this.id).preview.get();
|
||||
this._patch(data);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user