Merge pull request #1734 from TriForMine/fp-attempt-9001

Add missing transformers export
This commit is contained in:
Skillz4Killz
2021-11-11 10:31:05 -05:00
committed by GitHub
2 changed files with 16 additions and 20 deletions

View File

@@ -2,6 +2,7 @@ import { Bot } from "../bot.ts";
import { ButtonStyles } from "../types/messages/components/button_styles.ts";
import { DiscordMessageComponentTypes } from "../types/messages/components/message_component_types.ts";
import { SnakeCasedPropertiesDeep } from "../types/util.ts";
import { SelectOption } from "../types/messages/components/select_option.ts";
export function transformComponent(bot: Bot, payload: SnakeCasedPropertiesDeep<Component>): DiscordenoComponent {
return {
@@ -72,26 +73,6 @@ export interface Component {
components?: Component[];
}
export interface SelectOption {
/** The user-facing name of the option. Maximum 100 characters. */
label: string;
/** The dev-defined value of the option. Maximum 100 characters. */
value: string;
/** An additional description of the option. Maximum 100 characters. */
description?: string;
/** The id, name, and animated properties of an emoji. */
emoji?: {
/** Emoji id */
id?: string;
/** Emoji name */
name?: string;
/** Whether this emoji is animated */
animated?: boolean;
};
/** Will render this option as already-selected by default. */
default: boolean;
}
export interface DiscordenoComponent {
/** component type */
type: DiscordMessageComponentTypes;

View File

@@ -1,6 +1,21 @@
export * from "./activity.ts";
export * from "./application.ts";
export * from "./applicationCommandPermission.ts";
export * from "./attachment.ts";
export * from "./auditlogEntry.ts";
export * from "./channel.ts";
export * from "./component.ts";
export * from "./embed.ts";
export * from "./emoji.ts";
export * from "./guild.ts";
export * from "./integration.ts";
export * from "./interaction.ts";
export * from "./invite.ts";
export * from "./member.ts";
export * from "./message.ts";
export * from "./presence.ts";
export * from "./role.ts";
export * from "./team.ts";
export * from "./thread.ts";
export * from "./voice_state.ts";
export * from "./webhook.ts";