Skip to content

Commit 25595f1

Browse files
authored
Merge pull request #10 from A5rocks/main
🐛 Woah, begone bugs!
2 parents db7087d + 7fb2dae commit 25595f1

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

src/structures/ApplicationCommandInteractionData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import { snowflake } from "./Snowflake";
44
export type ApplicationCommandInteractionData = {
55
id: snowflake;
66
name: string;
7-
options: ApplicationCommandInteractionDataOption[];
7+
options?: ApplicationCommandInteractionDataOption[];
88
};

src/structures/ApplicationCommandInteractionDataOption.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { ApplicationCommandOptionType } from "./ApplicationCommandOptions";
1+
import { ApplicationCommandOptionValue } from "./ApplicationCommandOptions";
22

33
type ValueData = {
44
name: string;
5-
value: ApplicationCommandOptionType;
5+
value: ApplicationCommandOptionValue;
66
};
77

88
type NestedData = {

src/structures/ApplicationCommandOptions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export type ApplicationCommandOption = {
1010
options?: ApplicationCommandOption[];
1111
};
1212

13+
export type ApplicationCommandOptionValue = string | number | boolean;
14+
1315
export enum ApplicationCommandOptionType {
1416
SUB_COMMAND = 1,
1517
SUB_COMMAND_GROUP = 2,

src/structures/GuildMember.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { snowflake } from "./Snowflake";
22
import { User } from "./User";
33

44
export type GuildMember = {
5-
user?: User;
5+
// https://github.com/discord/discord-api-docs/pull/2295#discussion_r543021673
6+
user: User;
67
nick?: string;
78
roles: snowflake[];
89
joinedAt: Date;

src/structures/Interaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type ApplicationCommand = {
1515

1616
export type Interaction = ApplicationCommand | {
1717
id: snowflake;
18-
type: InteractionType;
18+
type: Exclude<InteractionType, InteractionType.APPLICATION_COMMAND>;
1919
data?: ApplicationCommandInteractionData;
2020
guildId: snowflake;
2121
channelId: snowflake;

0 commit comments

Comments
 (0)