mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Suggestions
This commit is contained in:
@@ -658,15 +658,11 @@ export async function createGuildFromTemplate(
|
||||
data.icon = await urlToBase64(data.icon);
|
||||
}
|
||||
|
||||
try {
|
||||
const guild: CreateGuildPayload = await RequestManager.post(
|
||||
const guild = await RequestManager.post(
|
||||
endpoints.GUILD_TEMPLATE(templateCode),
|
||||
data,
|
||||
) as any;
|
||||
) as Promise<CreateGuildPayload>;
|
||||
return guild;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -768,9 +764,9 @@ export async function editGuildTemplate(
|
||||
throw new Error("The description can only be in between 0-120 characters.");
|
||||
}
|
||||
|
||||
const template: GuildTemplate = await RequestManager.patch(
|
||||
const template = await RequestManager.patch(
|
||||
`${endpoints.GUILD_TEMPLATES(guildID)}/${templateCode}`,
|
||||
data,
|
||||
) as any;
|
||||
) as GuildTemplate;
|
||||
return structures.createTemplate(template);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user