seyfert 4.4.1 → 4.6.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.
Files changed (180) hide show
  1. package/README.md +7 -1
  2. package/lib/api/Routes/guilds.d.ts +12 -1
  3. package/lib/api/Routes/index.d.ts +3 -1
  4. package/lib/api/Routes/invites.d.ts +1 -1
  5. package/lib/api/Routes/oauth2.d.ts +11 -0
  6. package/lib/api/Routes/oauth2.js +2 -0
  7. package/lib/api/Routes/skus.d.ts +11 -4
  8. package/lib/api/Routes/users.d.ts +2 -1
  9. package/lib/api/Routes/voice.d.ts +4 -0
  10. package/lib/api/Routes/webhooks.d.ts +1 -1
  11. package/lib/api/api.d.ts +15 -5
  12. package/lib/api/api.js +243 -114
  13. package/lib/api/bucket.js +13 -7
  14. package/lib/api/shared.d.ts +3 -1
  15. package/lib/api/utils/constants.d.ts +1 -1
  16. package/lib/api/utils/constants.js +1 -1
  17. package/lib/builders/Attachment.d.ts +6 -1
  18. package/lib/builders/Attachment.js +13 -9
  19. package/lib/builders/CheckboxGroup.js +1 -1
  20. package/lib/builders/FileUpload.d.ts +8 -1
  21. package/lib/builders/FileUpload.js +9 -0
  22. package/lib/builders/RadioGroup.js +1 -1
  23. package/lib/client/base.d.ts +3 -3
  24. package/lib/client/client.d.ts +1 -1
  25. package/lib/client/client.js +5 -4
  26. package/lib/client/collectors.d.ts +10 -8
  27. package/lib/client/transformers.d.ts +5 -0
  28. package/lib/client/workerclient.d.ts +8 -1
  29. package/lib/client/workerclient.js +34 -14
  30. package/lib/commands/applications/chat.d.ts +6 -4
  31. package/lib/commands/applications/options.d.ts +6 -4
  32. package/lib/commands/applications/shared.d.ts +2 -2
  33. package/lib/commands/handle.d.ts +7 -3
  34. package/lib/commands/handle.js +36 -11
  35. package/lib/commands/handler.js +11 -0
  36. package/lib/commands/optionresolver.d.ts +6 -7
  37. package/lib/common/it/error.d.ts +13 -0
  38. package/lib/common/it/error.js +15 -1
  39. package/lib/common/it/logger.js +12 -9
  40. package/lib/common/shorters/application.d.ts +1 -1
  41. package/lib/common/shorters/application.js +1 -1
  42. package/lib/common/shorters/bans.js +1 -1
  43. package/lib/common/shorters/guilds.js +5 -1
  44. package/lib/common/shorters/interaction.js +7 -4
  45. package/lib/common/shorters/invites.d.ts +5 -0
  46. package/lib/common/shorters/members.js +2 -1
  47. package/lib/common/shorters/messages.js +2 -2
  48. package/lib/common/shorters/threads.js +1 -1
  49. package/lib/common/shorters/webhook.js +3 -3
  50. package/lib/common/types/util.d.ts +7 -0
  51. package/lib/components/componentcommand.js +2 -2
  52. package/lib/components/customId.d.ts +3 -0
  53. package/lib/components/customId.js +11 -0
  54. package/lib/components/handler.js +2 -3
  55. package/lib/components/modalcommand.js +2 -2
  56. package/lib/events/hooks/invite.d.ts +1 -0
  57. package/lib/events/hooks/presence.d.ts +1 -0
  58. package/lib/events/hooks/thread.d.ts +1 -0
  59. package/lib/index.d.ts +1 -1
  60. package/lib/index.js +2 -1
  61. package/lib/structures/AnonymousGuild.d.ts +1 -1
  62. package/lib/structures/AnonymousGuild.js +1 -1
  63. package/lib/structures/Guild.d.ts +3 -0
  64. package/lib/structures/GuildMember.d.ts +2 -2
  65. package/lib/structures/GuildMember.js +22 -4
  66. package/lib/structures/GuildPreview.d.ts +1 -1
  67. package/lib/structures/GuildPreview.js +1 -1
  68. package/lib/structures/GuildRole.d.ts +13 -0
  69. package/lib/structures/GuildRole.js +21 -0
  70. package/lib/structures/GuildTemplate.js +1 -1
  71. package/lib/structures/Interaction.d.ts +7 -7
  72. package/lib/structures/Interaction.js +35 -21
  73. package/lib/structures/Message.d.ts +2 -1
  74. package/lib/structures/channels.d.ts +29 -16
  75. package/lib/structures/channels.js +59 -19
  76. package/lib/structures/extra/BaseGuild.d.ts +4 -4
  77. package/lib/structures/extra/BaseGuild.js +4 -4
  78. package/lib/types/gateway.d.ts +243 -239
  79. package/lib/types/index.d.ts +2 -2
  80. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/attachment.d.ts +5 -2
  81. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/shared.d.ts +2 -2
  82. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/shared.js +1 -1
  83. package/lib/types/payloads/_interactions/_applicationCommands/chatInput.d.ts +7 -7
  84. package/lib/types/payloads/_interactions/_applicationCommands/contextMenu.d.ts +13 -13
  85. package/lib/types/payloads/_interactions/_applicationCommands/permissions.d.ts +4 -4
  86. package/lib/types/payloads/_interactions/_applicationCommands/permissions.js +2 -2
  87. package/lib/types/payloads/_interactions/applicationCommands.d.ts +10 -10
  88. package/lib/types/payloads/_interactions/applicationCommands.js +4 -4
  89. package/lib/types/payloads/_interactions/autocomplete.d.ts +2 -2
  90. package/lib/types/payloads/_interactions/base.d.ts +13 -7
  91. package/lib/types/payloads/_interactions/modalSubmit.d.ts +4 -4
  92. package/lib/types/payloads/_interactions/responses.d.ts +10 -10
  93. package/lib/types/payloads/_interactions/responses.js +2 -2
  94. package/lib/types/payloads/application.d.ts +21 -15
  95. package/lib/types/payloads/application.js +7 -7
  96. package/lib/types/payloads/auditLog.d.ts +22 -17
  97. package/lib/types/payloads/auditLog.js +7 -2
  98. package/lib/types/payloads/autoModeration.d.ts +11 -11
  99. package/lib/types/payloads/autoModeration.js +5 -5
  100. package/lib/types/payloads/channel.d.ts +87 -78
  101. package/lib/types/payloads/channel.js +16 -11
  102. package/lib/types/payloads/components.d.ts +41 -31
  103. package/lib/types/payloads/components.js +9 -5
  104. package/lib/types/payloads/emoji.d.ts +2 -2
  105. package/lib/types/payloads/emoji.js +1 -1
  106. package/lib/types/payloads/gateway.d.ts +33 -29
  107. package/lib/types/payloads/gateway.js +5 -5
  108. package/lib/types/payloads/guild.d.ts +68 -68
  109. package/lib/types/payloads/guild.js +14 -14
  110. package/lib/types/payloads/guildScheduledEvent.d.ts +11 -11
  111. package/lib/types/payloads/guildScheduledEvent.js +3 -3
  112. package/lib/types/payloads/index.d.ts +2 -2
  113. package/lib/types/payloads/interactions.d.ts +3 -3
  114. package/lib/types/payloads/invite.d.ts +11 -11
  115. package/lib/types/payloads/invite.js +3 -3
  116. package/lib/types/payloads/monetization.d.ts +4 -4
  117. package/lib/types/payloads/monetization.js +2 -2
  118. package/lib/types/payloads/oauth2.d.ts +21 -17
  119. package/lib/types/payloads/oauth2.js +21 -17
  120. package/lib/types/payloads/permissions.d.ts +5 -5
  121. package/lib/types/payloads/permissions.js +2 -2
  122. package/lib/types/payloads/poll.d.ts +7 -7
  123. package/lib/types/payloads/poll.js +2 -2
  124. package/lib/types/payloads/soundboard.d.ts +2 -2
  125. package/lib/types/payloads/soundboard.js +1 -1
  126. package/lib/types/payloads/stageInstance.d.ts +5 -5
  127. package/lib/types/payloads/stageInstance.js +1 -1
  128. package/lib/types/payloads/sticker.d.ts +8 -8
  129. package/lib/types/payloads/sticker.js +3 -3
  130. package/lib/types/payloads/teams.d.ts +8 -8
  131. package/lib/types/payloads/teams.js +3 -3
  132. package/lib/types/payloads/template.d.ts +3 -3
  133. package/lib/types/payloads/template.js +1 -1
  134. package/lib/types/payloads/user.d.ts +24 -22
  135. package/lib/types/payloads/user.js +7 -5
  136. package/lib/types/payloads/voice.d.ts +4 -4
  137. package/lib/types/payloads/voice.js +1 -1
  138. package/lib/types/payloads/webhokEvents.d.ts +5 -5
  139. package/lib/types/payloads/webhokEvents.js +2 -2
  140. package/lib/types/payloads/webhook.d.ts +4 -4
  141. package/lib/types/payloads/webhook.js +1 -1
  142. package/lib/types/rest/application.d.ts +14 -14
  143. package/lib/types/rest/auditLog.d.ts +1 -1
  144. package/lib/types/rest/autoModeration.d.ts +7 -7
  145. package/lib/types/rest/channel.d.ts +79 -74
  146. package/lib/types/rest/channel.js +1 -1
  147. package/lib/types/rest/emoji.d.ts +8 -8
  148. package/lib/types/rest/gateway.d.ts +2 -2
  149. package/lib/types/rest/guild.d.ts +98 -98
  150. package/lib/types/rest/guild.js +5 -5
  151. package/lib/types/rest/guildScheduledEvent.d.ts +11 -11
  152. package/lib/types/rest/index.d.ts +34 -3
  153. package/lib/types/rest/index.js +33 -2
  154. package/lib/types/rest/interactions.d.ts +48 -48
  155. package/lib/types/rest/invite.d.ts +5 -5
  156. package/lib/types/rest/monetization.d.ts +9 -9
  157. package/lib/types/rest/monetization.js +1 -1
  158. package/lib/types/rest/oauth2.d.ts +22 -18
  159. package/lib/types/rest/poll.d.ts +4 -4
  160. package/lib/types/rest/soundboard.d.ts +8 -8
  161. package/lib/types/rest/stageInstance.d.ts +6 -6
  162. package/lib/types/rest/sticker.d.ts +10 -10
  163. package/lib/types/rest/template.d.ts +11 -11
  164. package/lib/types/rest/user.d.ts +18 -14
  165. package/lib/types/rest/voice.d.ts +5 -5
  166. package/lib/types/rest/webhook.d.ts +38 -38
  167. package/lib/types/utils/index.d.ts +19 -19
  168. package/lib/types/utils/index.js +19 -19
  169. package/lib/websocket/SharedTypes.d.ts +2 -2
  170. package/lib/websocket/constants/index.js +2 -2
  171. package/lib/websocket/discord/heartbeater.d.ts +1 -0
  172. package/lib/websocket/discord/heartbeater.js +8 -0
  173. package/lib/websocket/discord/shard.d.ts +19 -10
  174. package/lib/websocket/discord/shard.js +255 -122
  175. package/lib/websocket/discord/sharder.d.ts +2 -2
  176. package/lib/websocket/discord/sharder.js +2 -2
  177. package/lib/websocket/discord/shared.d.ts +7 -2
  178. package/lib/websocket/discord/workermanager.d.ts +3 -1
  179. package/lib/websocket/discord/workermanager.js +31 -24
  180. package/package.json +3 -3
@@ -4,10 +4,10 @@ export * from './rest';
4
4
  export * from './rest';
5
5
  export * from './utils';
6
6
  /**
7
- * https://discord.com/developers/docs/reference#snowflakes
7
+ * https://docs.discord.com/developers/reference#snowflakes
8
8
  */
9
9
  export type Snowflake = string;
10
10
  /**
11
- * https://discord.com/developers/docs/topics/permissions
11
+ * https://docs.discord.com/developers/topics/permissions
12
12
  */
13
13
  export type Permissions = string;
@@ -1,5 +1,8 @@
1
- import type { Snowflake } from '../../../../index';
1
+ import type { FileUploadType, Snowflake } from '../../../../index';
2
2
  import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
3
3
  import type { ApplicationCommandOptionType } from './shared';
4
- export type APIApplicationCommandAttachmentOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;
4
+ export type APIApplicationCommandAttachmentOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment> & {
5
+ /** File types to accept; can contain media groups or dot-prefixed file extensions (maximum of 10) */
6
+ file_types?: FileUploadType[];
7
+ };
5
8
  export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Attachment, Snowflake>;
@@ -1,6 +1,6 @@
1
1
  import type { LocalizationMap } from '../../..';
2
2
  /**
3
- * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
3
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-object-application-command-option-type
4
4
  */
5
5
  export declare enum ApplicationCommandOptionType {
6
6
  Subcommand = 1,
@@ -16,7 +16,7 @@ export declare enum ApplicationCommandOptionType {
16
16
  Attachment = 11
17
17
  }
18
18
  /**
19
- * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
19
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-object-application-command-option-choice-structure
20
20
  */
21
21
  export interface APIApplicationCommandOptionChoice<ValueType = number | string> {
22
22
  name: string;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ApplicationCommandOptionType = void 0;
4
4
  /**
5
- * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
5
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-object-application-command-option-type
6
6
  */
7
7
  var ApplicationCommandOptionType;
8
8
  (function (ApplicationCommandOptionType) {
@@ -27,35 +27,35 @@ export * from './_chatInput/subcommand';
27
27
  export * from './_chatInput/subcommandGroup';
28
28
  export * from './_chatInput/user';
29
29
  /**
30
- * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
30
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-object-application-command-option-structure
31
31
  */
32
32
  export type APIApplicationCommandBasicOption = APIApplicationCommandAttachmentOption | APIApplicationCommandBooleanOption | APIApplicationCommandChannelOption | APIApplicationCommandIntegerOption | APIApplicationCommandMentionableOption | APIApplicationCommandNumberOption | APIApplicationCommandRoleOption | APIApplicationCommandStringOption | APIApplicationCommandUserOption;
33
33
  /**
34
- * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
34
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-object-application-command-option-structure
35
35
  */
36
36
  export type APIApplicationCommandOption = APIApplicationCommandBasicOption | APIApplicationCommandSubcommandGroupOption | APIApplicationCommandSubcommandOption;
37
37
  /**
38
- * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
38
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
39
39
  */
40
40
  export type APIApplicationCommandInteractionDataOption = APIApplicationCommandInteractionDataBasicOption | APIApplicationCommandInteractionDataSubcommandGroupOption | APIApplicationCommandInteractionDataSubcommandOption;
41
41
  export type APIApplicationCommandInteractionDataBasicOption = APIApplicationCommandInteractionDataAttachmentOption | APIApplicationCommandInteractionDataBooleanOption | APIApplicationCommandInteractionDataChannelOption | APIApplicationCommandInteractionDataIntegerOption | APIApplicationCommandInteractionDataMentionableOption | APIApplicationCommandInteractionDataNumberOption | APIApplicationCommandInteractionDataRoleOption | APIApplicationCommandInteractionDataStringOption | APIApplicationCommandInteractionDataUserOption;
42
42
  /**
43
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
43
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-data
44
44
  */
45
45
  export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
46
46
  options?: APIApplicationCommandInteractionDataOption[];
47
47
  resolved?: APIInteractionDataResolved;
48
48
  }
49
49
  /**
50
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
50
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
51
51
  */
52
52
  export type APIChatInputApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>;
53
53
  /**
54
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
54
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
55
55
  */
56
56
  export type APIChatInputApplicationCommandDMInteraction = APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>;
57
57
  /**
58
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
58
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
59
59
  */
60
60
  export type APIChatInputApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;
61
61
  /**
@@ -4,62 +4,62 @@ import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType }
4
4
  import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base';
5
5
  import type { APIBaseApplicationCommandInteractionData } from './internals';
6
6
  /**
7
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
7
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-data
8
8
  */
9
9
  export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
10
10
  target_id: Snowflake;
11
11
  resolved: APIUserInteractionDataResolved;
12
12
  }
13
13
  /**
14
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
14
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-data
15
15
  */
16
16
  export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
17
17
  target_id: Snowflake;
18
18
  resolved: APIMessageApplicationCommandInteractionDataResolved;
19
19
  }
20
20
  /**
21
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
21
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-resolved-data-structure
22
22
  */
23
23
  export interface APIMessageApplicationCommandInteractionDataResolved {
24
24
  messages: Record<Snowflake, APIMessage>;
25
25
  }
26
26
  /**
27
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
27
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-data
28
28
  */
29
29
  export type APIContextMenuInteractionData = APIMessageApplicationCommandInteractionData | APIUserApplicationCommandInteractionData;
30
30
  /**
31
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
31
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
32
32
  */
33
33
  export type APIUserApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>;
34
34
  /**
35
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
35
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
36
36
  */
37
37
  export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>;
38
38
  /**
39
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
39
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
40
40
  */
41
41
  export type APIUserApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>;
42
42
  /**
43
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
43
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
44
44
  */
45
45
  export type APIMessageApplicationCommandInteraction = APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>;
46
46
  /**
47
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
47
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
48
48
  */
49
49
  export type APIMessageApplicationCommandDMInteraction = APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>;
50
50
  /**
51
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
51
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
52
52
  */
53
53
  export type APIMessageApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>;
54
54
  /**
55
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
55
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
56
56
  */
57
57
  export type APIContextMenuInteraction = APIMessageApplicationCommandInteraction | APIUserApplicationCommandInteraction;
58
58
  /**
59
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
59
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
60
60
  */
61
61
  export type APIContextMenuDMInteraction = APIMessageApplicationCommandDMInteraction | APIUserApplicationCommandDMInteraction;
62
62
  /**
63
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
63
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
64
64
  */
65
65
  export type APIContextMenuGuildInteraction = APIMessageApplicationCommandGuildInteraction | APIUserApplicationCommandGuildInteraction;
@@ -1,6 +1,6 @@
1
1
  import type { Snowflake } from '../../../index';
2
2
  /**
3
- * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
3
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
4
4
  */
5
5
  export interface APIGuildApplicationCommandPermissions {
6
6
  /**
@@ -21,7 +21,7 @@ export interface APIGuildApplicationCommandPermissions {
21
21
  permissions: APIApplicationCommandPermission[];
22
22
  }
23
23
  /**
24
- * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
24
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
25
25
  */
26
26
  export interface APIApplicationCommandPermission {
27
27
  /**
@@ -38,7 +38,7 @@ export interface APIApplicationCommandPermission {
38
38
  permission: boolean;
39
39
  }
40
40
  /**
41
- * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
41
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-permissions-object-application-command-permission-type
42
42
  */
43
43
  export declare enum ApplicationCommandPermissionType {
44
44
  Role = 1,
@@ -46,7 +46,7 @@ export declare enum ApplicationCommandPermissionType {
46
46
  Channel = 3
47
47
  }
48
48
  /**
49
- * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
49
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
50
50
  */
51
51
  export declare const APIApplicationCommandPermissionsConstant: {
52
52
  Everyone: (guildId: bigint | string) => Snowflake;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.APIApplicationCommandPermissionsConstant = exports.ApplicationCommandPermissionType = void 0;
4
4
  /**
5
- * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
5
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-permissions-object-application-command-permission-type
6
6
  */
7
7
  var ApplicationCommandPermissionType;
8
8
  (function (ApplicationCommandPermissionType) {
@@ -11,7 +11,7 @@ var ApplicationCommandPermissionType;
11
11
  ApplicationCommandPermissionType[ApplicationCommandPermissionType["Channel"] = 3] = "Channel";
12
12
  })(ApplicationCommandPermissionType || (exports.ApplicationCommandPermissionType = ApplicationCommandPermissionType = {}));
13
13
  /**
14
- * https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
14
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
15
15
  */
16
16
  exports.APIApplicationCommandPermissionsConstant = {
17
17
  Everyone: (guildId) => String(guildId),
@@ -8,7 +8,7 @@ export * from './_applicationCommands/chatInput';
8
8
  export * from './_applicationCommands/contextMenu';
9
9
  export * from './_applicationCommands/permissions';
10
10
  /**
11
- * https://discord.com/developers/docs/interactions/application-commands#application-command-object
11
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-object
12
12
  */
13
13
  export interface APIApplicationCommand {
14
14
  /**
@@ -83,7 +83,7 @@ export interface APIApplicationCommand {
83
83
  handler?: EntryPointCommandHandlerType;
84
84
  }
85
85
  /**
86
- * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
86
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-object-application-command-types
87
87
  */
88
88
  export declare enum ApplicationCommandType {
89
89
  /**
@@ -104,7 +104,7 @@ export declare enum ApplicationCommandType {
104
104
  PrimaryEntryPoint = 4
105
105
  }
106
106
  /**
107
- * https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types
107
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-object-entry-point-command-handler-types
108
108
  */
109
109
  export declare enum EntryPointCommandHandlerType {
110
110
  /**
@@ -117,7 +117,7 @@ export declare enum EntryPointCommandHandlerType {
117
117
  DiscordLaunchActivity = 2
118
118
  }
119
119
  /**
120
- * https://discord.com/developers/docs/resources/application#application-object-application-integration-types
120
+ * https://docs.discord.com/developers/resources/application#application-object-application-integration-types
121
121
  */
122
122
  export declare enum ApplicationIntegrationType {
123
123
  /**
@@ -130,7 +130,7 @@ export declare enum ApplicationIntegrationType {
130
130
  UserInstall = 1
131
131
  }
132
132
  /**
133
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types
133
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-context-types
134
134
  */
135
135
  export declare enum InteractionContextType {
136
136
  /**
@@ -153,22 +153,22 @@ export declare enum InteractionContextType {
153
153
  export interface APIEntryPointInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.PrimaryEntryPoint> {
154
154
  }
155
155
  /**
156
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
156
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-data
157
157
  */
158
158
  export type APIApplicationCommandInteractionData = APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData | APIEntryPointInteractionData;
159
159
  /**
160
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
160
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
161
161
  */
162
162
  export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> = APIBaseInteraction<InteractionType.ApplicationCommand, Data> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommand, Data>, 'app_permissions' | 'channel' | 'data'>>;
163
163
  /**
164
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
164
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
165
165
  */
166
166
  export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction | APIEntryPointCommandInteraction;
167
167
  /**
168
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
168
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
169
169
  */
170
170
  export type APIApplicationCommandDMInteraction = APIChatInputApplicationCommandDMInteraction | APIContextMenuDMInteraction;
171
171
  /**
172
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
172
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
173
173
  */
174
174
  export type APIApplicationCommandGuildInteraction = APIChatInputApplicationCommandGuildInteraction | APIContextMenuGuildInteraction;
@@ -19,7 +19,7 @@ __exportStar(require("./_applicationCommands/chatInput"), exports);
19
19
  __exportStar(require("./_applicationCommands/contextMenu"), exports);
20
20
  __exportStar(require("./_applicationCommands/permissions"), exports);
21
21
  /**
22
- * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
22
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-object-application-command-types
23
23
  */
24
24
  var ApplicationCommandType;
25
25
  (function (ApplicationCommandType) {
@@ -41,7 +41,7 @@ var ApplicationCommandType;
41
41
  ApplicationCommandType[ApplicationCommandType["PrimaryEntryPoint"] = 4] = "PrimaryEntryPoint";
42
42
  })(ApplicationCommandType || (exports.ApplicationCommandType = ApplicationCommandType = {}));
43
43
  /**
44
- * https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types
44
+ * https://docs.discord.com/developers/interactions/application-commands#application-command-object-entry-point-command-handler-types
45
45
  */
46
46
  var EntryPointCommandHandlerType;
47
47
  (function (EntryPointCommandHandlerType) {
@@ -55,7 +55,7 @@ var EntryPointCommandHandlerType;
55
55
  EntryPointCommandHandlerType[EntryPointCommandHandlerType["DiscordLaunchActivity"] = 2] = "DiscordLaunchActivity";
56
56
  })(EntryPointCommandHandlerType || (exports.EntryPointCommandHandlerType = EntryPointCommandHandlerType = {}));
57
57
  /**
58
- * https://discord.com/developers/docs/resources/application#application-object-application-integration-types
58
+ * https://docs.discord.com/developers/resources/application#application-object-application-integration-types
59
59
  */
60
60
  var ApplicationIntegrationType;
61
61
  (function (ApplicationIntegrationType) {
@@ -69,7 +69,7 @@ var ApplicationIntegrationType;
69
69
  ApplicationIntegrationType[ApplicationIntegrationType["UserInstall"] = 1] = "UserInstall";
70
70
  })(ApplicationIntegrationType || (exports.ApplicationIntegrationType = ApplicationIntegrationType = {}));
71
71
  /**
72
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types
72
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-context-types
73
73
  */
74
74
  var InteractionContextType;
75
75
  (function (InteractionContextType) {
@@ -1,10 +1,10 @@
1
1
  import type { APIBaseInteraction, APIChatInputApplicationCommandInteractionData, APIDMInteractionWrapper, APIGuildInteractionWrapper, InteractionType } from '../index';
2
2
  export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>>, 'data'>>;
3
3
  /**
4
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
4
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
5
5
  */
6
6
  export type APIApplicationCommandAutocompleteDMInteraction = APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
7
7
  /**
8
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
8
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
9
9
  */
10
10
  export type APIApplicationCommandAutocompleteGuildInteraction = APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
@@ -8,7 +8,7 @@ import type { APIRole } from '../permissions';
8
8
  import type { APIUser } from '../user';
9
9
  import type { InteractionType } from './responses';
10
10
  /**
11
- * https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object
11
+ * https://docs.discord.com/developers/resources/channel#message-interaction-metadata-object
12
12
  */
13
13
  export interface APIMessageInteractionMetadata {
14
14
  /**
@@ -42,7 +42,7 @@ export interface APIMessageInteractionMetadata {
42
42
  }
43
43
  export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'avatar' | 'communication_disabled_until' | 'deaf' | 'joined_at' | 'mute' | 'nick' | 'pending' | 'premium_since' | 'roles'>;
44
44
  /**
45
- * https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
45
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#message-interaction-object
46
46
  */
47
47
  export interface APIMessageInteraction {
48
48
  /**
@@ -67,14 +67,14 @@ export interface APIMessageInteraction {
67
67
  member?: PartialAPIMessageInteractionGuildMember;
68
68
  }
69
69
  /**
70
- * https://discord.com/developers/docs/resources/guild#guild-member-object
70
+ * https://docs.discord.com/developers/resources/guild#guild-member-object
71
71
  */
72
72
  export interface APIInteractionGuildMember extends APIGuildMember {
73
73
  permissions: Permissions;
74
74
  user: APIUser;
75
75
  }
76
76
  /**
77
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
77
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
78
78
  */
79
79
  export interface APIBaseInteraction<Type extends InteractionType, Data> {
80
80
  /**
@@ -164,19 +164,25 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
164
164
  export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
165
165
  type: T;
166
166
  permissions: Permissions;
167
+ /**
168
+ * Computed permissions for the bot user in the channel.
169
+ *
170
+ * **This is only sent when the application's bot user is in the guild**
171
+ */
172
+ app_permissions?: Permissions;
167
173
  }
168
174
  /**
169
- * https://discord.com/developers/docs/resources/channel#channel-object
175
+ * https://docs.discord.com/developers/resources/channel#channel-object
170
176
  */
171
177
  export type APIInteractionDataResolvedChannel = APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>> | (APIInteractionDataResolvedChannelBase<ThreadChannelType> & Pick<APIThreadChannel, 'parent_id' | 'thread_metadata'>);
172
178
  /**
173
- * https://discord.com/developers/docs/resources/guild#guild-member-object
179
+ * https://docs.discord.com/developers/resources/guild#guild-member-object
174
180
  */
175
181
  export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'deaf' | 'mute' | 'user'> {
176
182
  permissions: Permissions;
177
183
  }
178
184
  /**
179
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
185
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-resolved-data-structure
180
186
  */
181
187
  export interface APIInteractionDataResolved {
182
188
  users?: Record<Snowflake, APIUser>;
@@ -42,7 +42,7 @@ export interface ModalSubmitInsideLabel<C extends ModalSubmitInsideLabelData = M
42
42
  component?: C;
43
43
  }
44
44
  /**
45
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure
45
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure
46
46
  */
47
47
  export interface APIModalSubmission {
48
48
  /**
@@ -80,14 +80,14 @@ export interface APIModalSubmission {
80
80
  };
81
81
  }
82
82
  /**
83
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
83
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
84
84
  */
85
85
  export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> & Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>;
86
86
  /**
87
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
87
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
88
88
  */
89
89
  export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>;
90
90
  /**
91
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
91
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object
92
92
  */
93
93
  export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;
@@ -3,7 +3,7 @@ import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../index';
3
3
  import type { APILabelComponent, APITextDisplayComponent, MessageFlags } from '../index';
4
4
  import type { APIApplicationCommandOptionChoice } from './applicationCommands';
5
5
  /**
6
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
6
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-type
7
7
  */
8
8
  export declare enum InteractionType {
9
9
  Ping = 1,
@@ -13,7 +13,7 @@ export declare enum InteractionType {
13
13
  ModalSubmit = 5
14
14
  }
15
15
  /**
16
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
16
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object
17
17
  */
18
18
  export type APIInteractionResponse = APIApplicationCommandAutocompleteResponse | APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponsePong | APIInteractionResponseUpdateMessage | APIModalInteractionResponse | APIInteractionResponseLaunchActivity;
19
19
  export interface APIInteractionResponsePong {
@@ -46,7 +46,7 @@ export interface APIInteractionResponseLaunchActivity {
46
46
  type: InteractionResponseType.LaunchActivity;
47
47
  }
48
48
  /**
49
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
49
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
50
50
  */
51
51
  export declare enum InteractionResponseType {
52
52
  /**
@@ -83,14 +83,14 @@ export declare enum InteractionResponseType {
83
83
  LaunchActivity = 12
84
84
  }
85
85
  /**
86
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
86
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
87
87
  */
88
88
  export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'avatar_url' | 'username'>;
89
89
  export interface APICommandAutocompleteInteractionResponseCallbackData {
90
90
  choices?: APIApplicationCommandOptionChoice[];
91
91
  }
92
92
  /**
93
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
93
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object-modal
94
94
  */
95
95
  export interface APIModalInteractionResponseCallbackData {
96
96
  /**
@@ -107,7 +107,7 @@ export interface APIModalInteractionResponseCallbackData {
107
107
  components: (APILabelComponent | APITextDisplayComponent)[];
108
108
  }
109
109
  /**
110
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-object
110
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-callback-interaction-callback-object
111
111
  */
112
112
  export interface InteractionCallbackData<T extends InteractionType = InteractionType> {
113
113
  id: string;
@@ -130,7 +130,7 @@ export interface InteractionCallbackData<T extends InteractionType = Interaction
130
130
  response_message_ephemeral?: boolean;
131
131
  }
132
132
  /**
133
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-resource-object
133
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-callback-interaction-callback-resource-object
134
134
  */
135
135
  export interface InteractionCallbackResourceActivity {
136
136
  /**
@@ -139,7 +139,7 @@ export interface InteractionCallbackResourceActivity {
139
139
  id: string;
140
140
  }
141
141
  /**
142
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-activity-instance-resource
142
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-callback-interaction-callback-activity-instance-resource
143
143
  */
144
144
  export interface InteractionCallbackResource<T extends InteractionResponseType = InteractionResponseType> {
145
145
  type: T;
@@ -155,14 +155,14 @@ export interface InteractionCallbackResource<T extends InteractionResponseType =
155
155
  };
156
156
  }
157
157
  /**
158
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object
158
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object
159
159
  */
160
160
  export interface InteractionCallbackResponse {
161
161
  interaction: InteractionCallbackData;
162
162
  resource?: InteractionCallbackResource;
163
163
  }
164
164
  /**
165
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object
165
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object
166
166
  */
167
167
  export type APIInteractionCallbackLaunchActivity = InteractionCallbackResponse & {
168
168
  resource?: Omit<MakeRequired<InteractionCallbackResource, 'activity_instance'>, 'message'>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InteractionResponseType = exports.InteractionType = void 0;
4
4
  /**
5
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
5
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-object-interaction-type
6
6
  */
7
7
  var InteractionType;
8
8
  (function (InteractionType) {
@@ -13,7 +13,7 @@ var InteractionType;
13
13
  InteractionType[InteractionType["ModalSubmit"] = 5] = "ModalSubmit";
14
14
  })(InteractionType || (exports.InteractionType = InteractionType = {}));
15
15
  /**
16
- * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
16
+ * https://docs.discord.com/developers/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
17
17
  */
18
18
  var InteractionResponseType;
19
19
  (function (InteractionResponseType) {