mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Better types for getGuildTemplate()
This commit is contained in:
@@ -24,6 +24,7 @@ import {
|
|||||||
PositionSwap,
|
PositionSwap,
|
||||||
PruneOptions,
|
PruneOptions,
|
||||||
PrunePayload,
|
PrunePayload,
|
||||||
|
Template,
|
||||||
UpdateGuildPayload,
|
UpdateGuildPayload,
|
||||||
UserPayload,
|
UserPayload,
|
||||||
} from "../types/guild.ts";
|
} from "../types/guild.ts";
|
||||||
@@ -624,10 +625,13 @@ export function getGuild(guildID: string, counts = true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the guild template if it exists */
|
/** 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(
|
return RequestManager.get(
|
||||||
`${endpoints.GUILD_TEMPLATES(guildID)}/${templateCode}`,
|
`${endpoints.GUILD_TEMPLATES(guildID)}/${templateCode}`,
|
||||||
);
|
) as any;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user