mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +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>>}
|
||||
*/
|
||||
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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user