ITOH
2021-04-13 22:23:11 +02:00
parent 646b799948
commit 92977d97dc
2 changed files with 21 additions and 0 deletions

View File

@@ -1,11 +1,14 @@
import { SnakeCasedPropertiesDeep } from "../util.ts";
import { ApplicationCommandInteractionDataOption } from "./application_command_interaction_data_option.ts";
import { ApplicationCommandInteractionDataResolved } from "./application_command_interaction_data_resolved.ts";
export interface ApplicationCommandInteractionData {
/** The Id of the invoked command */
id: string;
/** The name of the invoked command */
name: string;
/** Converted users + roles + channels */
resolved?: ApplicationCommandInteractionDataResolved;
/** The params + values from the user */
options?: ApplicationCommandInteractionDataOption[];
}

View File

@@ -0,0 +1,18 @@
import { Channel } from "../channels/channel.ts";
import { GuildMember } from "../guilds/guild_member.ts";
import { Role } from "../permissions/role.ts";
import { User } from "../users/user.ts";
export interface ApplicationCommandInteractionDataResolved {
/** The Ids and User objects */
users?: Record<string, User>;
/** The Ids and partial Member objects */
members?: Record<string, Omit<GuildMember, "user" | "deaf" | "mute">>;
/** The Ids and Role objects */
roes?: Record<string, Role>;
/** The Ids and partial Channel objects */
channels?: Record<
string,
Pick<Channel, "id" | "name" | "type" | "permissionOverwrites">
>;
}