@koishijs/plugin-adapter-discord 2.0.0-rc.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- import { ChannelType, snowflake } from '.';
1
+ import { Channel, snowflake } from '.';
2
2
  /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-structure */
3
3
  export interface ApplicationCommand {
4
4
  /** unique id of the command */
5
5
  id: snowflake;
6
6
  /** the type of command, defaults 1 if not set */
7
- type?: ApplicationCommandType;
7
+ type?: ApplicationCommand.Type;
8
8
  /** unique id of the parent application */
9
9
  application_id: snowflake;
10
10
  /** guild id of the command, if not global */
@@ -14,131 +14,201 @@ export interface ApplicationCommand {
14
14
  /** 1-100 character description for CHAT_INPUT commands, empty string for USER and MESSAGE commands */
15
15
  description: string;
16
16
  /** the parameters for the command, max 25 */
17
- options?: ApplicationCommandOption[];
17
+ options?: ApplicationCommand.Option[];
18
18
  /** whether the command is enabled by default when the app is added to a guild */
19
19
  default_permission?: boolean;
20
20
  /** autoincrementing version identifier updated during substantial record changes */
21
21
  version: snowflake;
22
22
  }
23
- /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types */
24
- export declare enum ApplicationCommandType {
25
- /** Slash commands; a text-based command that shows up when a user types / */
26
- CHAT_INPUT = 1,
27
- /** A UI-based command that shows up when you right click or tap on a user */
28
- USER = 2,
29
- /** A UI-based command that shows up when you right click or tap on a message */
30
- MESSAGE = 3
31
- }
32
- /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure */
33
- export interface ApplicationCommandOption {
34
- /** the type of option */
35
- type: ApplicationCommandOptionType;
36
- /** 1-32 character name */
37
- name: string;
38
- /** 1-100 character description */
39
- description: string;
40
- /** if the parameter is required or optional--default false */
41
- required?: boolean;
42
- /** choices for STRING, INTEGER, and NUMBER types for the user to pick from, max 25 */
43
- choices?: ApplicationCommandOptionChoice[];
44
- /** if the option is a subcommand or subcommand group type, this nested options will be the parameters */
45
- options?: ApplicationCommandOption[];
46
- /** if the option is a channel type, the channels shown will be restricted to these types */
47
- channel_types?: ChannelType[];
48
- }
49
- /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type */
50
- export declare enum ApplicationCommandOptionType {
51
- SUB_COMMAND = 1,
52
- SUB_COMMAND_GROUP = 2,
53
- STRING = 3,
54
- /** Any integer between -2^53 and 2^53 */
55
- INTEGER = 4,
56
- BOOLEAN = 5,
57
- USER = 6,
58
- /** Includes all channel types + categories */
59
- CHANNEL = 7,
60
- ROLE = 8,
61
- /** Includes users and roles */
62
- MENTIONABLE = 9,
63
- /** Any double between -2^53 and 2^53 */
64
- NUMBER = 10
65
- }
66
- /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure */
67
- export interface ApplicationCommandOptionChoice {
68
- /** 1-100 character choice name */
69
- name: string;
70
- /** value of the choice, up to 100 characters if string */
71
- value: string | number;
72
- }
73
- /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure */
74
- export interface ApplicationCommandInteractionDataOption {
75
- /** the name of the parameter */
76
- name: string;
77
- /** value of application command option type */
78
- type: ApplicationCommandOptionType;
79
- /** the value of the pair */
80
- value?: ApplicationCommandOptionType;
81
- /** present if this option is a group or subcommand */
82
- options?: ApplicationCommandInteractionDataOption[];
83
- }
84
- /** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure */
85
- export interface GuildApplicationCommandPermissions {
86
- /** the id of the command */
87
- id: snowflake;
88
- /** the id of the application the command belongs to */
89
- application_id: snowflake;
90
- /** the id of the guild */
91
- guild_id: snowflake;
92
- /** the permissions for the command in the guild */
93
- permissions: ApplicationCommandPermissions[];
94
- }
95
- /** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure */
96
- export interface ApplicationCommandPermissions {
97
- /** the id of the role or user */
98
- id: snowflake;
99
- /** role or user */
100
- type: ApplicationCommandPermissionType;
101
- /** true to allow, false, to disallow */
102
- permission: boolean;
103
- }
104
- /** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type */
105
- export declare enum ApplicationCommandPermissionType {
106
- ROLE = 1,
107
- USER = 2
23
+ export declare namespace ApplicationCommand {
24
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types */
25
+ enum Type {
26
+ /** Slash commands; a text-based command that shows up when a user types / */
27
+ CHAT_INPUT = 1,
28
+ /** A UI-based command that shows up when you right click or tap on a user */
29
+ USER = 2,
30
+ /** A UI-based command that shows up when you right click or tap on a message */
31
+ MESSAGE = 3
32
+ }
33
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure */
34
+ interface Option {
35
+ /** the type of option */
36
+ type: OptionType;
37
+ /** 1-32 character name */
38
+ name: string;
39
+ /** 1-100 character description */
40
+ description: string;
41
+ /** if the parameter is required or optional--default false */
42
+ required?: boolean;
43
+ /** choices for STRING, INTEGER, and NUMBER types for the user to pick from, max 25 */
44
+ choices?: OptionChoice[];
45
+ /** if the option is a subcommand or subcommand group type, this nested options will be the parameters */
46
+ options?: Option[];
47
+ /** if the option is a channel type, the channels shown will be restricted to these types */
48
+ channel_types?: Channel.Type[];
49
+ }
50
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type */
51
+ enum OptionType {
52
+ SUB_COMMAND = 1,
53
+ SUB_COMMAND_GROUP = 2,
54
+ STRING = 3,
55
+ /** Any integer between -2^53 and 2^53 */
56
+ INTEGER = 4,
57
+ BOOLEAN = 5,
58
+ USER = 6,
59
+ /** Includes all channel types + categories */
60
+ CHANNEL = 7,
61
+ ROLE = 8,
62
+ /** Includes users and roles */
63
+ MENTIONABLE = 9,
64
+ /** Any double between -2^53 and 2^53 */
65
+ NUMBER = 10
66
+ }
67
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure */
68
+ interface OptionChoice {
69
+ /** 1-100 character choice name */
70
+ name: string;
71
+ /** value of the choice, up to 100 characters if string */
72
+ value: string | number;
73
+ }
74
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure */
75
+ interface GuildPermissions {
76
+ /** the id of the command */
77
+ id: snowflake;
78
+ /** the id of the application the command belongs to */
79
+ application_id: snowflake;
80
+ /** the id of the guild */
81
+ guild_id: snowflake;
82
+ /** the permissions for the command in the guild */
83
+ permissions: Permissions[];
84
+ }
85
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure */
86
+ interface Permissions {
87
+ /** the id of the role or user */
88
+ id: snowflake;
89
+ /** role or user */
90
+ type: PermissionType;
91
+ /** true to allow, false, to disallow */
92
+ permission: boolean;
93
+ }
94
+ /** https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type */
95
+ enum PermissionType {
96
+ ROLE = 1,
97
+ USER = 2
98
+ }
99
+ namespace Params {
100
+ /** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command-json-params */
101
+ interface Create {
102
+ /** 1-32 character name */
103
+ name: string;
104
+ /** 1-100 character description */
105
+ description: string;
106
+ /** the parameters for the command */
107
+ options?: Option[];
108
+ /** whether the command is enabled by default when the app is added to a guild */
109
+ default_permission?: boolean;
110
+ /** the type of command, defaults 1 if not set */
111
+ type?: Type;
112
+ }
113
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command-json-params */
114
+ interface Edit {
115
+ /** 1-32 character name */
116
+ name?: string;
117
+ /** 1-100 character description */
118
+ description?: string;
119
+ /** the parameters for the command */
120
+ options?: Option[];
121
+ /** whether the command is enabled by default when the app is added to a guild */
122
+ default_permission?: boolean;
123
+ }
124
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions-json-params */
125
+ interface EditPermissions {
126
+ /** the permissions for the command in the guild */
127
+ permissions: Permissions[];
128
+ }
129
+ }
108
130
  }
109
131
  declare module './internal' {
110
132
  interface Internal {
111
- /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */
133
+ /**
134
+ * Fetch all of the global commands for your application. Returns an array of application command objects.
135
+ * @see https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands
136
+ */
112
137
  getGlobalApplicationCommands(application_id: snowflake): Promise<ApplicationCommand[]>;
113
- /** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */
114
- createGlobalApplicationCommand(application_id: snowflake, command: Partial<ApplicationCommand>): Promise<ApplicationCommand>;
115
- /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
138
+ /**
139
+ * Creating a command with the same name as an existing command for your application will overwrite the old command.
140
+ * @see https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
141
+ */
142
+ createGlobalApplicationCommand(application_id: snowflake, param: ApplicationCommand.Params.Create): Promise<ApplicationCommand>;
143
+ /**
144
+ * Takes a list of application commands, overwriting the existing global command list for this application. Updates will be available in all guilds after 1 hour. Returns 200 and a list of application command objects. Commands that do not already exist will count toward daily application command create limits.
145
+ * @see https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
146
+ */
116
147
  bulkOverwriteGlobalApplicationCommands(application_id: snowflake): Promise<ApplicationCommand[]>;
117
- /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-command */
148
+ /**
149
+ * Fetch a global command for your application. Returns an application command object.
150
+ * @see https://discord.com/developers/docs/interactions/application-commands#get-global-application-command
151
+ */
118
152
  getGlobalApplicationCommand(application_id: snowflake, command_id: snowflake): Promise<ApplicationCommand>;
119
- /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
120
- editGlobalApplicationCommand(application_id: snowflake, command_id: snowflake, command: Partial<ApplicationCommand>): Promise<ApplicationCommand>;
121
- /** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
153
+ /**
154
+ * All parameters for this endpoint are optional.
155
+ * @see https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
156
+ */
157
+ editGlobalApplicationCommand(application_id: snowflake, command_id: snowflake, param: ApplicationCommand.Params.Edit): Promise<ApplicationCommand>;
158
+ /**
159
+ * Deletes a global command. Returns 204 No Content on success.
160
+ * @see https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command
161
+ */
122
162
  deleteGlobalApplicationCommand(application_id: snowflake, command_id: snowflake): Promise<void>;
123
- /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
163
+ /**
164
+ * Fetch all of the guild commands for your application for a specific guild. Returns an array of application command objects.
165
+ * @see https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
166
+ */
124
167
  getGuildApplicationCommands(application_id: snowflake, guild_id: snowflake): Promise<ApplicationCommand[]>;
125
- /** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
126
- createGuildApplicationCommand(application_id: snowflake, guild_id: snowflake, command: Partial<ApplicationCommand>): Promise<ApplicationCommand>;
127
- /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
168
+ /**
169
+ * Creating a command with the same name as an existing command for your application will overwrite the old command.
170
+ * @see https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
171
+ */
172
+ createGuildApplicationCommand(application_id: snowflake, guild_id: snowflake, param: ApplicationCommand.Params.Create): Promise<ApplicationCommand>;
173
+ /**
174
+ * Takes a list of application commands, overwriting the existing command list for this application for the targeted guild. Returns 200 and a list of application command objects.
175
+ * @see https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
176
+ */
128
177
  bulkOverwriteGuildApplicationCommands(application_id: snowflake, guild_id: snowflake): Promise<void>;
129
- /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions */
130
- getGuildApplicationCommandPermissions(application_id: snowflake, guild_id: snowflake): Promise<GuildApplicationCommandPermissions[]>;
131
- /** https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions */
132
- batchEditApplicationCommandPermissions(application_id: snowflake, guild_id: snowflake, permissions: Partial<GuildApplicationCommandPermissions>[]): Promise<void>;
133
- /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
178
+ /**
179
+ * Fetches command permissions for all commands for your application in a guild. Returns an array of guild application command permissions objects.
180
+ * @see https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions
181
+ */
182
+ getGuildApplicationCommandPermissions(application_id: snowflake, guild_id: snowflake): Promise<ApplicationCommand.GuildPermissions[]>;
183
+ /**
184
+ * This endpoint will overwrite all existing permissions for all commands in a guild, including slash commands, user commands, and message commands.
185
+ * @see https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions
186
+ */
187
+ batchEditApplicationCommandPermissions(application_id: snowflake, guild_id: snowflake, permissions: Partial<ApplicationCommand.GuildPermissions>[]): Promise<void>;
188
+ /**
189
+ * Fetch a guild command for your application. Returns an application command object.
190
+ * @see https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command
191
+ */
134
192
  getGuildApplicationCommand(application_id: snowflake, guild_id: snowflake, command_id: snowflake): Promise<ApplicationCommand>;
135
- /** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
136
- editGuildApplicationCommand(application_id: snowflake, guild_id: snowflake, command_id: snowflake, command: Partial<ApplicationCommand>): Promise<ApplicationCommand>;
137
- /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
193
+ /**
194
+ * All parameters for this endpoint are optional.
195
+ * @see https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
196
+ */
197
+ editGuildApplicationCommand(application_id: snowflake, guild_id: snowflake, command_id: snowflake, param: ApplicationCommand.Params.Edit): Promise<ApplicationCommand>;
198
+ /**
199
+ * Delete a guild command. Returns 204 No Content on success.
200
+ * @see https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command
201
+ */
138
202
  deleteGuildApplicationCommand(application_id: snowflake, guild_id: snowflake, command_id: snowflake): Promise<void>;
139
- /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
140
- getApplicationCommandPermissions(application_id: snowflake, guild_id: snowflake, command_id: snowflake): Promise<GuildApplicationCommandPermissions>;
141
- /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
142
- editApplicationCommandPermissions(application_id: snowflake, guild_id: snowflake, command_id: snowflake, permissions: ApplicationCommandPermissions[]): Promise<GuildApplicationCommandPermissions>;
203
+ /**
204
+ * Fetches command permissions for a specific command for your application in a guild. Returns a guild application command permissions object.
205
+ * @see https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions
206
+ */
207
+ getApplicationCommandPermissions(application_id: snowflake, guild_id: snowflake, command_id: snowflake): Promise<ApplicationCommand.GuildPermissions>;
208
+ /**
209
+ * This endpoint will overwrite existing permissions for the command in that guild
210
+ * @see https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
211
+ */
212
+ editApplicationCommandPermissions(application_id: snowflake, guild_id: snowflake, command_id: snowflake, param: ApplicationCommand.Params.EditPermissions): Promise<ApplicationCommand.GuildPermissions>;
143
213
  }
144
214
  }
@@ -1,4 +1,4 @@
1
- import { GuildMember, integer, snowflake, User } from '.';
1
+ import { snowflake, User } from '.';
2
2
  /** https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure */
3
3
  export interface Emoji {
4
4
  /** emoji id */
@@ -18,94 +18,35 @@ export interface Emoji {
18
18
  /** whether this emoji can be used, may be false due to loss of Server Boosts */
19
19
  available?: boolean;
20
20
  }
21
- /** https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure */
22
- export interface Reaction {
23
- /** times this emoji has been used to react */
24
- count: integer;
25
- /** whether the current user reacted using this emoji */
26
- me: boolean;
27
- /** emoji information */
28
- emoji: Partial<Emoji>;
29
- }
30
- /** https://discord.com/developers/docs/topics/gateway#guild-emojis-update-guild-emojis-update-event-fields */
31
- export interface GuildEmojisUpdateEvent {
32
- /** id of the guild */
33
- guild_id: snowflake;
34
- /** array of emojis */
35
- emojis: Emoji[];
36
- }
37
- /** https://discord.com/developers/docs/topics/gateway#message-reaction-add-message-reaction-add-event-fields */
38
- export interface MessageReactionAddEvent {
39
- /** the id of the user */
40
- user_id: snowflake;
41
- /** the id of the channel */
42
- channel_id: snowflake;
43
- /** the id of the message */
44
- message_id: snowflake;
45
- /** the id of the guild */
46
- guild_id?: snowflake;
47
- /** the member who reacted if this happened in a guild */
48
- member?: GuildMember;
49
- /** the emoji used to react - example */
50
- emoji: Partial<Emoji>;
51
- }
52
- /** https://discord.com/developers/docs/topics/gateway#message-reaction-remove-message-reaction-remove-event-fields */
53
- export interface MessageReactionRemoveEvent {
54
- /** the id of the user */
55
- user_id: snowflake;
56
- /** the id of the channel */
57
- channel_id: snowflake;
58
- /** the id of the message */
59
- message_id: snowflake;
60
- /** the id of the guild */
61
- guild_id?: snowflake;
62
- /** the emoji used to react - example */
63
- emoji: Partial<Emoji>;
64
- }
65
- /** https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all-message-reaction-remove-all-event-fields */
66
- export interface MessageReactionRemoveAllEvent {
67
- /** the id of the channel */
68
- channel_id: snowflake;
69
- /** the id of the message */
70
- message_id: snowflake;
71
- /** the id of the guild */
72
- guild_id?: snowflake;
73
- }
74
- /** https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji-message-reaction-remove-emoji */
75
- export interface MessageReactionRemoveEmojiEvent {
76
- /** the id of the channel */
77
- channel_id: snowflake;
78
- /** the id of the guild */
79
- guild_id?: snowflake;
80
- /** the id of the message */
81
- message_id: snowflake;
82
- /** the emoji that was removed */
83
- emoji: Partial<Emoji>;
21
+ export declare namespace Emoji {
22
+ namespace Event {
23
+ /** https://discord.com/developers/docs/topics/gateway#guild-emojis-update-guild-emojis-update-event-fields */
24
+ interface Update {
25
+ /** id of the guild */
26
+ guild_id: snowflake;
27
+ /** array of emojis */
28
+ emojis: Emoji[];
29
+ }
30
+ }
31
+ /** https://discord.com/developers/docs/resources/emoji#create-guild-emoji-json-params */
32
+ interface CreateParams extends ModifyParams {
33
+ /** the 128x128 emoji image */
34
+ image: string;
35
+ }
36
+ /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji-json-params */
37
+ interface ModifyParams {
38
+ /** name of the emoji */
39
+ name?: string;
40
+ /** array of snowflakes roles allowed to use this emoji */
41
+ roles?: snowflake[];
42
+ }
84
43
  }
85
44
  declare module './gateway' {
86
45
  interface GatewayEvents {
87
46
  /** guild emojis were updated */
88
- GUILD_EMOJIS_UPDATE: GuildEmojisUpdateEvent;
89
- /** user reacted to a message */
90
- MESSAGE_REACTION_ADD: MessageReactionAddEvent;
91
- /** user removed a reaction from a message */
92
- MESSAGE_REACTION_REMOVE: MessageReactionRemoveEvent;
93
- /** all reactions were explicitly removed from a message */
94
- MESSAGE_REACTION_REMOVE_ALL: MessageReactionRemoveAllEvent;
95
- /** all reactions for a given emoji were explicitly removed from a message */
96
- MESSAGE_REACTION_REMOVE_EMOJI: MessageReactionRemoveEmojiEvent;
47
+ GUILD_EMOJIS_UPDATE: Emoji.Event.Update;
97
48
  }
98
49
  }
99
- export interface ModifyGuildEmojiOptions {
100
- /** name of the emoji */
101
- name?: string;
102
- /** array of snowflakes roles allowed to use this emoji */
103
- roles?: snowflake[];
104
- }
105
- export interface CreateGuildEmojiOptions extends ModifyGuildEmojiOptions {
106
- /** the 128x128 emoji image */
107
- image: string;
108
- }
109
50
  declare module './internal' {
110
51
  interface Internal {
111
52
  /** https://discord.com/developers/docs/resources/emoji#list-guild-emojis */
@@ -113,32 +54,10 @@ declare module './internal' {
113
54
  /** https://discord.com/developers/docs/resources/emoji#get-guild-emoji */
114
55
  getGuildEmoji(guild_id: snowflake, emoji_id: snowflake): Promise<Emoji>;
115
56
  /** https://discord.com/developers/docs/resources/emoji#create-guild-emoji */
116
- createGuildEmoji(guild_id: snowflake, options: CreateGuildEmojiOptions): Promise<Emoji>;
57
+ createGuildEmoji(guild_id: snowflake, options: Emoji.CreateParams): Promise<Emoji>;
117
58
  /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji */
118
- modifyGuildEmoji(guild_id: snowflake, emoji_id: snowflake, options: ModifyGuildEmojiOptions): Promise<Emoji>;
59
+ modifyGuildEmoji(guild_id: snowflake, emoji_id: snowflake, options: Emoji.ModifyParams): Promise<Emoji>;
119
60
  /** https://discord.com/developers/docs/resources/emoji#delete-guild-emoji */
120
61
  deleteGuildEmoji(guild_id: snowflake, emoji_id: snowflake): Promise<void>;
121
62
  }
122
63
  }
123
- export interface GetReactionsOptions {
124
- /** get users after this user ID */
125
- after?: snowflake;
126
- /** max number of users to return (1-100) */
127
- limit?: integer;
128
- }
129
- declare module './internal' {
130
- interface Internal {
131
- /** https://discord.com/developers/docs/resources/channel#create-reaction */
132
- createReaction(channel_id: snowflake, message_id: snowflake, emoji: string): Promise<void>;
133
- /** https://discord.com/developers/docs/resources/channel#delete-own-reaction */
134
- deleteOwnReaction(channel_id: snowflake, message_id: snowflake, emoji: string): Promise<void>;
135
- /** https://discord.com/developers/docs/resources/channel#delete-user-reaction */
136
- deleteUserReaction(channel_id: snowflake, message_id: snowflake, emoji: string, user_id: snowflake): Promise<void>;
137
- /** https://discord.com/developers/docs/resources/channel#get-reactions */
138
- getReactions(channel_id: snowflake, message_id: snowflake, emoji: string, options?: GetReactionsOptions): Promise<Reaction[]>;
139
- /** https://discord.com/developers/docs/resources/channel#delete-all-reactions */
140
- deleteAllReactions(channel_id: snowflake, message_id: snowflake): Promise<void>;
141
- /** https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji */
142
- deleteAllReactionsForEmoji(channel_id: snowflake, message_id: snowflake, emoji: string): Promise<void>;
143
- }
144
- }
@@ -234,9 +234,15 @@ export interface SessionStartLimit {
234
234
  }
235
235
  declare module './internal' {
236
236
  interface Internal {
237
- /** https://discord.com/developers/docs/topics/gateway#get-gateway */
237
+ /**
238
+ * Returns an object with a single valid WSS URL, which the client can use for Connecting. Clients should cache this value and only call this endpoint to retrieve a new URL if they are unable to properly establish a connection using the cached version of the URL.
239
+ * @see https://discord.com/developers/docs/topics/gateway#get-gateway
240
+ */
238
241
  getGateway(): Promise<any>;
239
- /** https://discord.com/developers/docs/topics/gateway#get-gateway-bot */
242
+ /**
243
+ * Returns an object based on the information in Get Gateway, plus additional metadata that can help during the operation of large or sharded bots. Unlike the Get Gateway, this route should not be cached for extended periods of time as the value is not guaranteed to be the same per-call, and changes as the bot joins/leaves guilds.
244
+ * @see https://discord.com/developers/docs/topics/gateway#get-gateway-bot
245
+ */
240
246
  getGatewayBot(): Promise<any>;
241
247
  }
242
248
  }