Files
discordeno/helpers/guilds/getWidgetImageUrl.ts
2022-02-11 09:49:53 +00:00

8 lines
392 B
TypeScript

import type { Bot } from "../../bot.ts";
import type { GetGuildWidgetImageQuery } from "../../types/guilds/getGuildWidgetImage.ts";
/** Returns the widget image URL for the guild. */
export async function getWidgetImageURL(bot: Bot, guildId: bigint, options?: GetGuildWidgetImageQuery) {
return `${bot.constants.endpoints.GUILD_WIDGET(guildId)}.png?style=${options?.style ?? "shield"}`;
}