Skip to content

Commit

Permalink
Added more requested changes
Browse files Browse the repository at this point in the history
now use Record
componentType is now component_type
choices is an array
  • Loading branch information
JustCat80 committed Aug 1, 2021
1 parent 019df74 commit ffcaaaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
21 changes: 7 additions & 14 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,7 @@ declare namespace Eris {
data?: InteractionContent;
};

type InteractionContent = {
allowedMentions?: AllowedMentions;
content?: string;
embeds?: EmbedOptions[];
flags?: number;
tts?: boolean;
};

type InteractionContent = Pick<WebhookPayload, "content" | "embeds" | "allowedMentions" | "tts" | "flags">
type InteractionWebhookContent = Pick<WebhookPayload, "content" | "embeds" | "file" | "allowedMentions" | "tts" | "flags">;

//Slash Commands
Expand All @@ -99,7 +92,7 @@ declare namespace Eris {
name: string;
description: string;
required?: boolean;
choices?: { name: string; value: string | number};
choices?: { name: string; value: string | number}[];
options?: SlashCommandOptions[];
};

Expand Down Expand Up @@ -2348,10 +2341,10 @@ declare namespace Eris {
id: string;
name: string;
resolved?: {
users?: {[id: string]: User};
members?: { [id: string]: Omit<Member, "user" | "deaf" | "mute"> };
roles?: { [id: string]: Role };
channels?: { [id: string]: PartialChannel };
users?: Record<string, User>;
members?: Record<string, Omit<Member, "user" | "deaf" | "mute">>;
roles?: Record<string, Role>;
channels?: Record<string, PartialChannel>;
};
options?: InteractionDataOptions[];
};
Expand All @@ -2373,7 +2366,7 @@ declare namespace Eris {
export class ComponentInteraction extends Interaction {
channelID: string;
data: {
componentType: 2 | 3;
component_type: 2 | 3;
custom_id: string;
values?: string[];
};
Expand Down
2 changes: 1 addition & 1 deletion lib/structures/ComponentInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {InteractionResponseTypes} = require("../Constants");
* @extends Interaction
* @prop {String} channelID The ID of the channel in which the interaction was created
* @prop {Object} data The data attached to the interaction
* @prop {Number} data.componentType The type of Message Component
* @prop {Number} data.component_type The type of Message Component
* @prop {String} data.custom_id The ID of the Message Component
* @prop {Array<String>?} data.values The value of the run selected options (Select Menus Only)
* @prop {String?} guildID The ID of the guild in which the interaction was created
Expand Down

0 comments on commit ffcaaaa

Please sign in to comment.