mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
fix(Guild): unable to fetch templates (#8420)
This commit is contained in:
@@ -560,7 +560,7 @@ class Guild extends AnonymousGuild {
|
|||||||
* @returns {Promise<Collection<string, GuildTemplate>>}
|
* @returns {Promise<Collection<string, GuildTemplate>>}
|
||||||
*/
|
*/
|
||||||
async fetchTemplates() {
|
async fetchTemplates() {
|
||||||
const templates = await this.client.rest.get(Routes.guildTemplate(this.id));
|
const templates = await this.client.rest.get(Routes.guildTemplates(this.id));
|
||||||
return templates.reduce((col, data) => col.set(data.code, new GuildTemplate(this.client, data)), new Collection());
|
return templates.reduce((col, data) => col.set(data.code, new GuildTemplate(this.client, data)), new Collection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user