mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
* (transformers) return as Optionalize<typeof> * fix check error Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
18 lines
529 B
TypeScript
18 lines
529 B
TypeScript
import { Bot } from "../bot.ts";
|
|
import { DiscordVoiceRegion } from "../types/discord.ts";
|
|
import { Optionalize } from "../types/shared.ts";
|
|
|
|
export function transformVoiceRegion(bot: Bot, payload: DiscordVoiceRegion) {
|
|
const voiceRegion = {
|
|
id: payload.id,
|
|
name: payload.name,
|
|
optimal: payload.optimal,
|
|
deprecated: payload.deprecated,
|
|
custom: payload.custom,
|
|
};
|
|
|
|
return voiceRegion as Optionalize<typeof voiceRegion>;
|
|
}
|
|
|
|
export interface VoiceRegions extends ReturnType<typeof transformVoiceRegion> {}
|