mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-31 07:50:07 +00:00
14 lines
397 B
TypeScript
14 lines
397 B
TypeScript
import { Bot } from "../../bot.ts";
|
|
import { DiscordGuildWidgetSettings } from "../../types/discord.ts";
|
|
import { GuildWidgetSettings } from "../widgetSettings.ts";
|
|
|
|
export function transformWidgetSettingsToDiscordWidgetSettings(
|
|
bot: Bot,
|
|
payload: GuildWidgetSettings,
|
|
): DiscordGuildWidgetSettings {
|
|
return {
|
|
enabled: payload.enabled,
|
|
channel_id: payload.channelId ?? null,
|
|
};
|
|
}
|