Better types for getGuildTemplate()

This commit is contained in:
ayntee
2020-11-14 10:44:58 +04:00
parent 9c5031259f
commit d31cf09c64
+6 -2
View File
@@ -24,6 +24,7 @@ import {
PositionSwap,
PruneOptions,
PrunePayload,
Template,
UpdateGuildPayload,
UserPayload,
} from "../types/guild.ts";
@@ -624,10 +625,13 @@ export function getGuild(guildID: string, counts = true) {
}
/** Returns the guild template if it exists */
export function getGuildTemplate(guildID: string, templateCode: string) {
export function getGuildTemplate(
guildID: string,
templateCode: string,
): Promise<Template> {
return RequestManager.get(
`${endpoints.GUILD_TEMPLATES(guildID)}/${templateCode}`,
);
) as any;
}
/**