disgroove 1.3.1 → 1.3.3-dev.1

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 (267) hide show
  1. package/README.md +1 -1
  2. package/dist/lib/Client.d.ts +234 -0
  3. package/dist/lib/Client.js +256 -0
  4. package/dist/lib/Client.js.map +1 -0
  5. package/dist/lib/constants.d.ts +1084 -0
  6. package/dist/lib/constants.js +1163 -0
  7. package/dist/lib/constants.js.map +1 -0
  8. package/dist/lib/gateway/Shard.d.ts +25 -0
  9. package/dist/lib/gateway/Shard.js +522 -0
  10. package/dist/lib/gateway/Shard.js.map +1 -0
  11. package/dist/lib/gateway/ShardsManager.d.ts +5 -0
  12. package/dist/lib/gateway/ShardsManager.js +13 -0
  13. package/dist/lib/gateway/ShardsManager.js.map +1 -0
  14. package/dist/lib/gateway/index.d.ts +2 -0
  15. package/dist/lib/gateway/index.js +19 -0
  16. package/dist/lib/gateway/index.js.map +1 -0
  17. package/dist/lib/index.d.ts +7 -0
  18. package/dist/lib/index.js +24 -0
  19. package/dist/lib/index.js.map +1 -0
  20. package/dist/lib/rest/CDN.d.ts +21 -0
  21. package/dist/lib/rest/CDN.js +46 -0
  22. package/dist/lib/rest/CDN.js.map +1 -0
  23. package/dist/lib/rest/Endpoints.d.ts +94 -0
  24. package/dist/lib/rest/Endpoints.js +211 -0
  25. package/dist/lib/rest/Endpoints.js.map +1 -0
  26. package/dist/lib/rest/REST.d.ts +22 -0
  27. package/dist/lib/rest/REST.js +35 -0
  28. package/dist/lib/rest/REST.js.map +1 -0
  29. package/dist/lib/rest/RequestsManager.d.ts +17 -0
  30. package/dist/lib/rest/RequestsManager.js +124 -0
  31. package/dist/lib/rest/RequestsManager.js.map +1 -0
  32. package/dist/lib/rest/index.d.ts +4 -0
  33. package/dist/lib/rest/index.js +34 -0
  34. package/dist/lib/rest/index.js.map +1 -0
  35. package/dist/lib/structures/Application.d.ts +174 -0
  36. package/dist/lib/structures/Application.js +328 -0
  37. package/dist/lib/structures/Application.js.map +1 -0
  38. package/dist/lib/structures/ApplicationCommand.d.ts +45 -0
  39. package/dist/lib/structures/ApplicationCommand.js +127 -0
  40. package/dist/lib/structures/ApplicationCommand.js.map +1 -0
  41. package/dist/lib/structures/AuditLog.d.ts +20 -0
  42. package/dist/lib/structures/AuditLog.js +76 -0
  43. package/dist/lib/structures/AuditLog.js.map +1 -0
  44. package/dist/lib/structures/AutoModerationRule.d.ts +34 -0
  45. package/dist/lib/structures/AutoModerationRule.js +96 -0
  46. package/dist/lib/structures/AutoModerationRule.js.map +1 -0
  47. package/dist/lib/structures/Base.d.ts +17 -0
  48. package/dist/lib/structures/Base.js +31 -0
  49. package/dist/lib/structures/Base.js.map +1 -0
  50. package/dist/lib/structures/Channel.d.ts +253 -0
  51. package/dist/lib/structures/Channel.js +591 -0
  52. package/dist/lib/structures/Channel.js.map +1 -0
  53. package/dist/lib/structures/ClientApplication.d.ts +150 -0
  54. package/dist/lib/structures/ClientApplication.js +241 -0
  55. package/dist/lib/structures/ClientApplication.js.map +1 -0
  56. package/dist/lib/structures/Emoji.d.ts +28 -0
  57. package/dist/lib/structures/Emoji.js +79 -0
  58. package/dist/lib/structures/Emoji.js.map +1 -0
  59. package/dist/lib/structures/Entitlement.d.ts +24 -0
  60. package/dist/lib/structures/Entitlement.js +68 -0
  61. package/dist/lib/structures/Entitlement.js.map +1 -0
  62. package/dist/lib/structures/Guild.d.ts +462 -0
  63. package/dist/lib/structures/Guild.js +1095 -0
  64. package/dist/lib/structures/Guild.js.map +1 -0
  65. package/dist/lib/structures/GuildMember.d.ts +50 -0
  66. package/dist/lib/structures/GuildMember.js +149 -0
  67. package/dist/lib/structures/GuildMember.js.map +1 -0
  68. package/dist/lib/structures/GuildScheduledEvent.d.ts +49 -0
  69. package/dist/lib/structures/GuildScheduledEvent.js +118 -0
  70. package/dist/lib/structures/GuildScheduledEvent.js.map +1 -0
  71. package/dist/lib/structures/GuildTemplate.d.ts +32 -0
  72. package/dist/lib/structures/GuildTemplate.js +76 -0
  73. package/dist/lib/structures/GuildTemplate.js.map +1 -0
  74. package/dist/lib/structures/Integration.d.ts +30 -0
  75. package/dist/lib/structures/Integration.js +102 -0
  76. package/dist/lib/structures/Integration.js.map +1 -0
  77. package/dist/lib/structures/Interaction.d.ts +76 -0
  78. package/dist/lib/structures/Interaction.js +345 -0
  79. package/dist/lib/structures/Interaction.js.map +1 -0
  80. package/dist/lib/structures/Invite.d.ts +28 -0
  81. package/dist/lib/structures/Invite.js +86 -0
  82. package/dist/lib/structures/Invite.js.map +1 -0
  83. package/dist/lib/structures/Message.d.ts +84 -0
  84. package/dist/lib/structures/Message.js +300 -0
  85. package/dist/lib/structures/Message.js.map +1 -0
  86. package/dist/lib/structures/Role.d.ts +37 -0
  87. package/dist/lib/structures/Role.js +90 -0
  88. package/dist/lib/structures/Role.js.map +1 -0
  89. package/dist/lib/structures/SKU.d.ts +23 -0
  90. package/dist/lib/structures/SKU.js +63 -0
  91. package/dist/lib/structures/SKU.js.map +1 -0
  92. package/dist/lib/structures/StageInstance.d.ts +24 -0
  93. package/dist/lib/structures/StageInstance.js +57 -0
  94. package/dist/lib/structures/StageInstance.js.map +1 -0
  95. package/dist/lib/structures/Sticker.d.ts +31 -0
  96. package/dist/lib/structures/Sticker.js +86 -0
  97. package/dist/lib/structures/Sticker.js.map +1 -0
  98. package/dist/lib/structures/Team.d.ts +14 -0
  99. package/dist/lib/structures/Team.js +39 -0
  100. package/dist/lib/structures/Team.js.map +1 -0
  101. package/dist/lib/structures/TestEntitlement.d.ts +23 -0
  102. package/dist/lib/structures/TestEntitlement.js +61 -0
  103. package/dist/lib/structures/TestEntitlement.js.map +1 -0
  104. package/dist/lib/structures/UnavailableGuild.d.ts +11 -0
  105. package/dist/lib/structures/UnavailableGuild.js +25 -0
  106. package/dist/lib/structures/UnavailableGuild.js.map +1 -0
  107. package/dist/lib/structures/User.d.ts +63 -0
  108. package/dist/lib/structures/User.js +177 -0
  109. package/dist/lib/structures/User.js.map +1 -0
  110. package/dist/lib/structures/VoiceState.d.ts +26 -0
  111. package/dist/lib/structures/VoiceState.js +70 -0
  112. package/dist/lib/structures/VoiceState.js.map +1 -0
  113. package/dist/lib/structures/Webhook.d.ts +84 -0
  114. package/dist/lib/structures/Webhook.js +239 -0
  115. package/dist/lib/structures/Webhook.js.map +1 -0
  116. package/dist/lib/structures/index.d.ts +27 -0
  117. package/dist/lib/structures/index.js +44 -0
  118. package/dist/lib/structures/index.js.map +1 -0
  119. package/dist/lib/types/application-command.d.ts +102 -0
  120. package/dist/lib/types/application-command.js +3 -0
  121. package/dist/lib/types/application-command.js.map +1 -0
  122. package/dist/lib/types/application-role-connection-metadata.d.ts +18 -0
  123. package/dist/lib/types/application-role-connection-metadata.js +3 -0
  124. package/dist/lib/types/application-role-connection-metadata.js.map +1 -0
  125. package/dist/lib/types/application.d.ts +66 -0
  126. package/dist/lib/types/application.js +3 -0
  127. package/dist/lib/types/application.js.map +1 -0
  128. package/dist/lib/types/audit-log.d.ts +82 -0
  129. package/dist/lib/types/audit-log.js +3 -0
  130. package/dist/lib/types/audit-log.js.map +1 -0
  131. package/dist/lib/types/auto-moderation.d.ts +65 -0
  132. package/dist/lib/types/auto-moderation.js +3 -0
  133. package/dist/lib/types/auto-moderation.js.map +1 -0
  134. package/dist/lib/types/channel.d.ts +456 -0
  135. package/dist/lib/types/channel.js +3 -0
  136. package/dist/lib/types/channel.js.map +1 -0
  137. package/dist/lib/types/emoji.d.ts +22 -0
  138. package/dist/lib/types/emoji.js +3 -0
  139. package/dist/lib/types/emoji.js.map +1 -0
  140. package/dist/lib/types/entitlements.d.ts +32 -0
  141. package/dist/lib/types/entitlements.js +3 -0
  142. package/dist/lib/types/entitlements.js.map +1 -0
  143. package/dist/lib/types/gateway-events.d.ts +805 -0
  144. package/dist/lib/types/gateway-events.js +3 -0
  145. package/dist/lib/types/gateway-events.js.map +1 -0
  146. package/dist/lib/types/guild-scheduled-event.d.ts +57 -0
  147. package/dist/lib/types/guild-scheduled-event.js +3 -0
  148. package/dist/lib/types/guild-scheduled-event.js.map +1 -0
  149. package/dist/lib/types/guild-template.d.ts +28 -0
  150. package/dist/lib/types/guild-template.js +3 -0
  151. package/dist/lib/types/guild-template.js.map +1 -0
  152. package/dist/lib/types/guild.d.ts +333 -0
  153. package/dist/lib/types/guild.js +3 -0
  154. package/dist/lib/types/guild.js.map +1 -0
  155. package/dist/lib/types/index.d.ts +23 -0
  156. package/dist/lib/types/index.js +40 -0
  157. package/dist/lib/types/index.js.map +1 -0
  158. package/dist/lib/types/interaction.d.ts +170 -0
  159. package/dist/lib/types/interaction.js +3 -0
  160. package/dist/lib/types/interaction.js.map +1 -0
  161. package/dist/lib/types/invite.d.ts +59 -0
  162. package/dist/lib/types/invite.js +3 -0
  163. package/dist/lib/types/invite.js.map +1 -0
  164. package/dist/lib/types/message-components.d.ts +100 -0
  165. package/dist/lib/types/message-components.js +3 -0
  166. package/dist/lib/types/message-components.js.map +1 -0
  167. package/dist/lib/types/role.d.ts +47 -0
  168. package/dist/lib/types/role.js +3 -0
  169. package/dist/lib/types/role.js.map +1 -0
  170. package/dist/lib/types/sku.d.ts +30 -0
  171. package/dist/lib/types/sku.js +3 -0
  172. package/dist/lib/types/sku.js.map +1 -0
  173. package/dist/lib/types/stage-instance.d.ts +20 -0
  174. package/dist/lib/types/stage-instance.js +3 -0
  175. package/dist/lib/types/stage-instance.js.map +1 -0
  176. package/dist/lib/types/sticker.d.ts +61 -0
  177. package/dist/lib/types/sticker.js +3 -0
  178. package/dist/lib/types/sticker.js.map +1 -0
  179. package/dist/lib/types/team.d.ts +30 -0
  180. package/dist/lib/types/team.js +3 -0
  181. package/dist/lib/types/team.js.map +1 -0
  182. package/dist/lib/types/user.d.ts +77 -0
  183. package/dist/lib/types/user.js +3 -0
  184. package/dist/lib/types/user.js.map +1 -0
  185. package/dist/lib/types/voice.d.ts +47 -0
  186. package/dist/lib/types/voice.js +3 -0
  187. package/dist/lib/types/voice.js.map +1 -0
  188. package/dist/lib/types/webhook.d.ts +31 -0
  189. package/dist/lib/types/webhook.js +3 -0
  190. package/dist/lib/types/webhook.js.map +1 -0
  191. package/dist/lib/utils/Util.d.ts +15 -0
  192. package/dist/lib/utils/Util.js +543 -0
  193. package/dist/lib/utils/Util.js.map +1 -0
  194. package/dist/lib/utils/errors.d.ts +12 -0
  195. package/dist/lib/utils/errors.js +25 -0
  196. package/dist/lib/utils/errors.js.map +1 -0
  197. package/dist/lib/utils/index.d.ts +2 -0
  198. package/dist/lib/utils/index.js +19 -0
  199. package/dist/lib/utils/index.js.map +1 -0
  200. package/dist/package.json +1 -1
  201. package/lib/Client.ts +616 -0
  202. package/lib/constants.ts +1173 -0
  203. package/lib/gateway/Shard.ts +704 -0
  204. package/lib/gateway/ShardsManager.ts +11 -0
  205. package/lib/gateway/index.ts +2 -0
  206. package/lib/index.ts +7 -0
  207. package/lib/rest/CDN.ts +56 -0
  208. package/lib/rest/Endpoints.ts +241 -0
  209. package/lib/rest/REST.ts +45 -0
  210. package/lib/rest/RequestsManager.ts +134 -0
  211. package/lib/rest/index.ts +4 -0
  212. package/lib/structures/Application.ts +599 -0
  213. package/lib/structures/ApplicationCommand.ts +187 -0
  214. package/lib/structures/AuditLog.ts +112 -0
  215. package/lib/structures/AutoModerationRule.ts +127 -0
  216. package/lib/structures/Base.ts +39 -0
  217. package/lib/structures/Channel.ts +921 -0
  218. package/lib/structures/ClientApplication.ts +515 -0
  219. package/lib/structures/Emoji.ts +95 -0
  220. package/lib/structures/Entitlement.ts +65 -0
  221. package/lib/structures/Guild.ts +1842 -0
  222. package/lib/structures/GuildMember.ts +193 -0
  223. package/lib/structures/GuildScheduledEvent.ts +164 -0
  224. package/lib/structures/GuildTemplate.ts +103 -0
  225. package/lib/structures/Integration.ts +136 -0
  226. package/lib/structures/Interaction.ts +506 -0
  227. package/lib/structures/Invite.ts +108 -0
  228. package/lib/structures/Message.ts +421 -0
  229. package/lib/structures/Role.ts +116 -0
  230. package/lib/structures/SKU.ts +63 -0
  231. package/lib/structures/StageInstance.ts +74 -0
  232. package/lib/structures/Sticker.ts +100 -0
  233. package/lib/structures/Team.ts +41 -0
  234. package/lib/structures/TestEntitlement.ts +78 -0
  235. package/lib/structures/UnavailableGuild.ts +27 -0
  236. package/lib/structures/User.ts +233 -0
  237. package/lib/structures/VoiceState.ts +72 -0
  238. package/lib/structures/Webhook.ts +341 -0
  239. package/lib/structures/index.ts +27 -0
  240. package/lib/types/application-command.ts +118 -0
  241. package/lib/types/application-role-connection-metadata.ts +23 -0
  242. package/lib/types/application.ts +77 -0
  243. package/lib/types/audit-log.ts +105 -0
  244. package/lib/types/auto-moderation.ts +78 -0
  245. package/lib/types/channel.ts +534 -0
  246. package/lib/types/emoji.ts +24 -0
  247. package/lib/types/entitlements.ts +34 -0
  248. package/lib/types/gateway-events.ts +970 -0
  249. package/lib/types/guild-scheduled-event.ts +67 -0
  250. package/lib/types/guild-template.ts +30 -0
  251. package/lib/types/guild.ts +388 -0
  252. package/lib/types/index.ts +23 -0
  253. package/lib/types/interaction.ts +224 -0
  254. package/lib/types/invite.ts +78 -0
  255. package/lib/types/message-components.ts +127 -0
  256. package/lib/types/role.ts +51 -0
  257. package/lib/types/sku.ts +32 -0
  258. package/lib/types/stage-instance.ts +22 -0
  259. package/lib/types/sticker.ts +67 -0
  260. package/lib/types/team.ts +34 -0
  261. package/lib/types/user.ts +93 -0
  262. package/lib/types/voice.ts +51 -0
  263. package/lib/types/webhook.ts +40 -0
  264. package/lib/utils/Util.ts +600 -0
  265. package/lib/utils/errors.ts +23 -0
  266. package/lib/utils/index.ts +2 -0
  267. package/package.json +1 -1
@@ -0,0 +1,224 @@
1
+ import type {
2
+ RawAttachment,
3
+ RawChannel,
4
+ RawGuildMember,
5
+ RawMessage,
6
+ RawUser,
7
+ RawRole,
8
+ JSONAttachment,
9
+ JSONUser,
10
+ JSONGuildMember,
11
+ JSONMessage,
12
+ JSONRole,
13
+ JSONChannel,
14
+ JSONEntitlement,
15
+ RawEntitlement,
16
+ RawEmbed,
17
+ RawAllowedMentions,
18
+ RawActionRow,
19
+ RawApplicationCommandOptionChoice,
20
+ JSONEmbed,
21
+ JSONAllowedMentions,
22
+ JSONActionRow,
23
+ JSONApplicationCommandOptionChoice,
24
+ RawTextInput,
25
+ JSONTextInput,
26
+ } from ".";
27
+ import type {
28
+ ApplicationCommandOptionType,
29
+ ApplicationCommandTypes,
30
+ ComponentTypes,
31
+ InteractionCallbackType,
32
+ InteractionType,
33
+ MessageFlags,
34
+ } from "../constants";
35
+ import type { File } from "../rest";
36
+
37
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure */
38
+ export interface RawInteraction {
39
+ id: string;
40
+ application_id: string;
41
+ type: InteractionType;
42
+ data?: RawApplicationCommandData &
43
+ RawMessageComponentData &
44
+ RawModalSubmitData;
45
+ guild_id?: string;
46
+ channel?: RawChannel;
47
+ channel_id?: string;
48
+ member?: RawGuildMember;
49
+ user?: RawUser;
50
+ token: string;
51
+ version: number;
52
+ message?: RawMessage;
53
+ app_permissions?: string;
54
+ locale?: string;
55
+ guild_locale?: string;
56
+ entitlements: Array<RawEntitlement>;
57
+ }
58
+
59
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-application-command-data-structure */
60
+ export interface RawApplicationCommandData {
61
+ id: string;
62
+ name: string;
63
+ type: ApplicationCommandTypes;
64
+ resolved?: RawResolvedData;
65
+ options?: Array<RawApplicationCommandInteractionDataOption>;
66
+ guild_id?: string;
67
+ target_id?: string;
68
+ }
69
+
70
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-message-component-data-structure */
71
+ export interface RawMessageComponentData {
72
+ custom_id: string;
73
+ component_type: ComponentTypes;
74
+ values?: Array<string>;
75
+ resolved?: RawResolvedData;
76
+ }
77
+
78
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure */
79
+ export interface RawModalSubmitData {
80
+ custom_id: string;
81
+ components: Array<{
82
+ type: ComponentTypes.ActionRow;
83
+ components: Array<RawTextInput>;
84
+ }>;
85
+ }
86
+
87
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure */
88
+ export interface RawResolvedData {
89
+ users?: Record<string, RawUser>;
90
+ members?: Record<string, RawGuildMember>;
91
+ roles?: Record<string, RawRole>;
92
+ channels?: Record<string, RawChannel>;
93
+ messages?: Record<string, RawMessage>;
94
+ attachments?: Record<string, RawAttachment>;
95
+ }
96
+
97
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-application-command-interaction-data-option-structure */
98
+ export interface RawApplicationCommandInteractionDataOption {
99
+ name: string;
100
+ type: ApplicationCommandOptionType;
101
+ value?: string | number | boolean;
102
+ options?: Array<RawApplicationCommandInteractionDataOption>;
103
+ focused?: boolean;
104
+ }
105
+
106
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object-message-interaction-structure */
107
+ export interface RawMessageInteraction {
108
+ id: string;
109
+ type: InteractionType;
110
+ name: string;
111
+ user: RawUser;
112
+ member?: RawGuildMember;
113
+ }
114
+
115
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-response-structure */
116
+ export interface RawInteractionResponse {
117
+ type: InteractionCallbackType;
118
+ data?: RawInteractionCallbackData;
119
+ }
120
+
121
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure */
122
+ export interface RawInteractionCallbackData {
123
+ tts?: boolean;
124
+ content?: string;
125
+ embeds?: Array<RawEmbed>;
126
+ allowed_mentions?: RawAllowedMentions;
127
+ flags?: MessageFlags;
128
+ components?: Array<RawActionRow>;
129
+ attachments?: Array<RawAttachment>;
130
+ files?: Array<File>;
131
+ choices?: Array<RawApplicationCommandOptionChoice>;
132
+ custom_id?: string;
133
+ title?: string;
134
+ }
135
+
136
+ export interface JSONInteraction {
137
+ id: string;
138
+ applicationId: string;
139
+ type: InteractionType;
140
+ data?: JSONApplicationCommandData &
141
+ JSONMessageComponentData &
142
+ JSONModalSubmitData;
143
+ guildId?: string;
144
+ channel?: JSONChannel;
145
+ channelId?: string;
146
+ member?: JSONGuildMember;
147
+ user?: JSONUser;
148
+ token: string;
149
+ version: number;
150
+ message?: JSONMessage;
151
+ appPermissions?: string;
152
+ locale?: string;
153
+ guildLocale?: string;
154
+ entitlements: Array<JSONEntitlement>;
155
+ }
156
+
157
+ export interface JSONApplicationCommandData {
158
+ id: string;
159
+ name: string;
160
+ type: ApplicationCommandTypes;
161
+ resolved?: JSONResolvedData;
162
+ options?: Array<JSONApplicationCommandInteractionDataOption>;
163
+ guildId?: string;
164
+ targetId?: string;
165
+ }
166
+
167
+ export interface JSONMessageComponentData {
168
+ customId: string;
169
+ componentType: ComponentTypes;
170
+ values?: Array<string>;
171
+ resolved?: JSONResolvedData;
172
+ }
173
+
174
+ export interface JSONModalSubmitData {
175
+ customId: string;
176
+ components: Array<{
177
+ type: ComponentTypes.ActionRow;
178
+ components: Array<JSONTextInput>;
179
+ }>;
180
+ }
181
+
182
+ export interface JSONResolvedData {
183
+ users?: Map<string, JSONUser>;
184
+ members?: Map<string, JSONGuildMember>;
185
+ roles?: Map<string, JSONRole>;
186
+ channels?: Map<string, JSONChannel>;
187
+ messages?: Map<string, JSONMessage>;
188
+ attachments?: Map<string, JSONAttachment>;
189
+ }
190
+
191
+ export interface JSONApplicationCommandInteractionDataOption {
192
+ name: string;
193
+ type: ApplicationCommandOptionType;
194
+ value?: string | number | boolean;
195
+ options?: Array<JSONApplicationCommandInteractionDataOption>;
196
+ focused?: boolean;
197
+ }
198
+
199
+ export interface JSONMessageInteraction {
200
+ id: string;
201
+ type: InteractionType;
202
+ name: string;
203
+ user: JSONUser;
204
+ member?: JSONGuildMember;
205
+ }
206
+
207
+ export interface JSONInteractionResponse {
208
+ type: InteractionCallbackType;
209
+ data?: JSONInteractionCallbackData;
210
+ }
211
+
212
+ export interface JSONInteractionCallbackData {
213
+ tts?: boolean;
214
+ content?: string;
215
+ embeds?: Array<JSONEmbed>;
216
+ allowedMentions?: JSONAllowedMentions;
217
+ flags?: MessageFlags;
218
+ components?: Array<JSONActionRow>;
219
+ attachments?: Array<JSONAttachment>;
220
+ files?: Array<File>;
221
+ choices?: Array<JSONApplicationCommandOptionChoice>;
222
+ customId?: string;
223
+ title?: string;
224
+ }
@@ -0,0 +1,78 @@
1
+ import type {
2
+ JSONApplication,
3
+ JSONChannel,
4
+ JSONGuild,
5
+ JSONGuildMember,
6
+ JSONGuildScheduledEvent,
7
+ JSONUser,
8
+ RawApplication,
9
+ RawChannel,
10
+ RawGuild,
11
+ RawGuildMember,
12
+ RawGuildScheduledEvent,
13
+ RawUser,
14
+ } from ".";
15
+ import type { InviteTargetTypes } from "../constants";
16
+
17
+ /** https://discord.com/developers/docs/resources/invite#invite-object-invite-structure */
18
+ export interface RawInvite {
19
+ code: string;
20
+ guild?: RawGuild;
21
+ channel: RawChannel;
22
+ inviter?: RawUser;
23
+ target_type?: InviteTargetTypes;
24
+ target_user?: RawUser;
25
+ target_application?: RawApplication;
26
+ approximate_presence_count?: number;
27
+ approximate_member_count?: number;
28
+ expires_at?: string | null;
29
+ stage_instance?: RawInviteStageInstance;
30
+ guild_scheduled_event?: RawGuildScheduledEvent;
31
+ }
32
+
33
+ /** https://discord.com/developers/docs/resources/invite#invite-metadata-object-invite-metadata-structure */
34
+ export interface RawInviteMetadata {
35
+ uses: number;
36
+ max_uses: number;
37
+ max_age: number;
38
+ temporary: boolean;
39
+ created_at: string;
40
+ }
41
+
42
+ /** https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure */
43
+ export interface RawInviteStageInstance {
44
+ members: Array<RawGuildMember>;
45
+ participant_count: number;
46
+ speaker_count: number;
47
+ topic: string;
48
+ }
49
+
50
+ export interface JSONInvite {
51
+ code: string;
52
+ guild?: JSONGuild;
53
+ channel: JSONChannel;
54
+ inviter?: JSONUser;
55
+ targetType?: InviteTargetTypes;
56
+ targetUser?: JSONUser;
57
+ targetApplication?: JSONApplication;
58
+ approximatePresenceCount?: number;
59
+ approximateMemberCount?: number;
60
+ expiresAt?: string | null;
61
+ stageInstance?: JSONInviteStageInstance;
62
+ guildScheduledEvent?: JSONGuildScheduledEvent;
63
+ }
64
+
65
+ export interface JSONInviteMetadata {
66
+ uses: number;
67
+ maxUses: number;
68
+ maxAge: number;
69
+ temporary: boolean;
70
+ createdAt: string;
71
+ }
72
+
73
+ export interface JSONInviteStageInstance {
74
+ members: Array<JSONGuildMember>;
75
+ participantCount: number;
76
+ speakerCount: number;
77
+ topic: string;
78
+ }
@@ -0,0 +1,127 @@
1
+ import type { JSONEmoji, RawEmoji } from ".";
2
+ import type {
3
+ ButtonStyles,
4
+ ChannelTypes,
5
+ ComponentTypes,
6
+ TextInputStyles,
7
+ } from "../constants";
8
+
9
+ /** https://discord.com/developers/docs/interactions/message-components#button-object-button-structure */
10
+ export interface RawButton {
11
+ type: ComponentTypes.Button;
12
+ style: ButtonStyles;
13
+ label?: string;
14
+ emoji?: Pick<RawEmoji, "name" | "id" | "animated">;
15
+ custom_id?: string;
16
+ url?: string;
17
+ disabled?: boolean;
18
+ }
19
+
20
+ /** https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-menu-structure */
21
+ export interface RawSelectMenu {
22
+ type:
23
+ | ComponentTypes.ChannelSelect
24
+ | ComponentTypes.MentionableSelect
25
+ | ComponentTypes.RoleSelect
26
+ | ComponentTypes.StringSelect
27
+ | ComponentTypes.UserSelect;
28
+ custom_id: string;
29
+ options?: Array<RawSelectOption>;
30
+ channel_types?: Array<ChannelTypes>;
31
+ placeholder?: string;
32
+ default_values?: Array<RawDefaultValue>;
33
+ min_values?: number;
34
+ max_values?: number;
35
+ disabled?: boolean;
36
+ }
37
+
38
+ /** https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure */
39
+ export interface RawSelectOption {
40
+ label: string;
41
+ value: string;
42
+ description?: string;
43
+ emoji?: Pick<RawEmoji, "name" | "id" | "animated">;
44
+ default?: boolean;
45
+ }
46
+
47
+ /** https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure */
48
+ export interface RawDefaultValue {
49
+ id: string;
50
+ type: string;
51
+ }
52
+
53
+ /** https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-structure */
54
+ export interface RawTextInput {
55
+ type: ComponentTypes.TextInput;
56
+ custom_id: string;
57
+ style: TextInputStyles;
58
+ label: string;
59
+ min_length?: number;
60
+ max_length?: number;
61
+ required?: boolean;
62
+ value?: string;
63
+ placeholder?: string;
64
+ }
65
+
66
+ /** https://discord.com/developers/docs/interactions/message-components#action-rows */
67
+ export interface RawActionRow {
68
+ type: ComponentTypes.ActionRow;
69
+ components: Array<RawButton | RawSelectMenu | RawTextInput>;
70
+ }
71
+
72
+ export interface JSONButton {
73
+ type: ComponentTypes.Button;
74
+ style: ButtonStyles;
75
+ label?: string;
76
+ emoji?: Pick<JSONEmoji, "name" | "id" | "animated">;
77
+ customId?: string;
78
+ url?: string;
79
+ disabled?: boolean;
80
+ }
81
+
82
+ export interface JSONSelectMenu {
83
+ type:
84
+ | ComponentTypes.ChannelSelect
85
+ | ComponentTypes.MentionableSelect
86
+ | ComponentTypes.RoleSelect
87
+ | ComponentTypes.StringSelect
88
+ | ComponentTypes.UserSelect;
89
+ customId: string;
90
+ options?: Array<JSONSelectOption>;
91
+ channelTypes?: Array<ChannelTypes>;
92
+ placeholder?: string;
93
+ defaultValues?: Array<JSONDefaultValue>;
94
+ minValues?: number;
95
+ maxValues?: number;
96
+ disabled?: boolean;
97
+ }
98
+
99
+ export interface JSONSelectOption {
100
+ label: string;
101
+ value: string;
102
+ description?: string;
103
+ emoji?: Pick<JSONEmoji, "name" | "id" | "animated">;
104
+ default?: boolean;
105
+ }
106
+
107
+ export interface JSONDefaultValue {
108
+ id: string;
109
+ type: string;
110
+ }
111
+
112
+ export interface JSONTextInput {
113
+ type: ComponentTypes.TextInput;
114
+ customId: string;
115
+ style: TextInputStyles;
116
+ label: string;
117
+ minLength?: number;
118
+ maxLength?: number;
119
+ required?: boolean;
120
+ value?: string;
121
+ placeholder?: string;
122
+ }
123
+
124
+ export interface JSONActionRow {
125
+ type: ComponentTypes.ActionRow;
126
+ components: Array<JSONButton | JSONSelectMenu | JSONTextInput>;
127
+ }
@@ -0,0 +1,51 @@
1
+ import type { RoleFlags } from "../constants";
2
+
3
+ /** https://discord.com/developers/docs/topics/permissions#role-object-role-structure */
4
+ export interface RawRole {
5
+ id: string;
6
+ name: string;
7
+ color: number;
8
+ hoist: boolean;
9
+ icon?: string | null;
10
+ unicode_emoji?: string | null;
11
+ position: number;
12
+ permissions: string;
13
+ managed: boolean;
14
+ mentionable: boolean;
15
+ tags?: RawRoleTags;
16
+ flags: RoleFlags;
17
+ }
18
+
19
+ /** https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure */
20
+ export interface RawRoleTags {
21
+ bot_id?: string;
22
+ integration_id?: string;
23
+ premium_subscriber?: null;
24
+ subscription_listing_id?: string;
25
+ available_for_purchase?: null;
26
+ guild_connections?: null;
27
+ }
28
+
29
+ export interface JSONRole {
30
+ id: string;
31
+ name: string;
32
+ color: number;
33
+ hoist: boolean;
34
+ icon?: string | null;
35
+ unicodeEmoji?: string | null;
36
+ position: number;
37
+ permissions: string;
38
+ managed: boolean;
39
+ mentionable: boolean;
40
+ tags?: JSONRoleTags;
41
+ flags: RoleFlags;
42
+ }
43
+
44
+ export interface JSONRoleTags {
45
+ botId?: string;
46
+ integrationId?: string;
47
+ premiumSubscriber?: null;
48
+ subscriptionListingId?: string;
49
+ availableForPurchase?: null;
50
+ guildConnections?: null;
51
+ }
@@ -0,0 +1,32 @@
1
+ import type { SKUFlags, SKUTypes } from "../constants";
2
+
3
+ /** https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure */
4
+ export interface RawSKU {
5
+ id: string;
6
+ type: SKUTypes;
7
+ dependent_sku_id?: string | null; // Undocumented
8
+ application_id: string;
9
+ manifest_labels?: null; // Undocumented
10
+ access_type?: number; // Undocumented
11
+ name: string;
12
+ features?: []; // Undocumented
13
+ release_date?: null; // Undocumented
14
+ slug: string;
15
+ flags: SKUFlags;
16
+ show_age_gate?: boolean; // Undocumented
17
+ }
18
+
19
+ export interface JSONSKU {
20
+ id: string;
21
+ type: SKUTypes;
22
+ dependentSKUId?: string | null; // Undocumented
23
+ applicationId: string;
24
+ manifestLabels?: null; // Undocumented
25
+ accessType?: number; // Undocumented
26
+ name: string;
27
+ features?: []; // Undocumented
28
+ releaseDate?: null; // Undocumented
29
+ slug: string;
30
+ flags: SKUFlags;
31
+ showAgeGate?: boolean; // Undocumented
32
+ }
@@ -0,0 +1,22 @@
1
+ import type { PrivacyLevel } from "../constants";
2
+
3
+ /** https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-stage-instance-structure */
4
+ export interface RawStageInstance {
5
+ id: string;
6
+ guild_id: string;
7
+ channel_id: string;
8
+ topic: string;
9
+ privacy_level: PrivacyLevel;
10
+ discoverable_disabled: boolean;
11
+ guild_scheduled_event_id: string | null;
12
+ }
13
+
14
+ export interface JSONStageInstance {
15
+ id: string;
16
+ guildId: string;
17
+ channelId: string;
18
+ topic: string;
19
+ privacyLevel: PrivacyLevel;
20
+ discoverableDisabled: boolean;
21
+ guildScheduledEventId: string | null;
22
+ }
@@ -0,0 +1,67 @@
1
+ import type { StickerTypes, StickerFormatTypes } from "../constants";
2
+ import type { JSONUser, RawUser } from ".";
3
+
4
+ /** https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-structure */
5
+ export interface RawSticker {
6
+ id: string;
7
+ pack_id?: string;
8
+ name: string;
9
+ description: string | null;
10
+ tags: string;
11
+ asset?: string;
12
+ type: StickerTypes;
13
+ format_type: StickerFormatTypes;
14
+ available?: boolean;
15
+ guild_id?: string;
16
+ user?: RawUser;
17
+ sort_value?: number;
18
+ }
19
+
20
+ /** https://discord.com/developers/docs/resources/sticker#sticker-item-object-sticker-item-structure */
21
+ export interface RawStickerItem {
22
+ id: string;
23
+ name: string;
24
+ format_type: StickerFormatTypes;
25
+ }
26
+
27
+ /** https://discord.com/developers/docs/resources/sticker#sticker-pack-object-sticker-pack-structure */
28
+ export interface RawStickerPack {
29
+ id: string;
30
+ stickers: Array<RawSticker>;
31
+ name: string;
32
+ sku_id: string;
33
+ cover_sticker_id?: string;
34
+ description: string;
35
+ banner_asset_id?: string;
36
+ }
37
+
38
+ export interface JSONSticker {
39
+ id: string;
40
+ packId?: string;
41
+ name: string;
42
+ description: string | null;
43
+ tags: string;
44
+ asset?: string;
45
+ type: StickerTypes;
46
+ formatType: StickerFormatTypes;
47
+ available?: boolean;
48
+ guildId?: string;
49
+ user?: JSONUser;
50
+ sortValue?: number;
51
+ }
52
+
53
+ export interface JSONStickerItem {
54
+ id: string;
55
+ name: string;
56
+ formatType: StickerFormatTypes;
57
+ }
58
+
59
+ export interface JSONStickerPack {
60
+ id: string;
61
+ stickers: Array<JSONSticker>;
62
+ name: string;
63
+ skuId: string;
64
+ coverStickerId?: string;
65
+ description: string;
66
+ bannerAssetId?: string;
67
+ }
@@ -0,0 +1,34 @@
1
+ import type { JSONUser, RawUser } from ".";
2
+ import type { TeamMemberRoleTypes } from "../constants";
3
+
4
+ /** https://discord.com/developers/docs/topics/teams#data-models-team-object */
5
+ export interface RawTeam {
6
+ icon: string | null;
7
+ id: string;
8
+ members: Array<RawTeamMember>;
9
+ name: string;
10
+ owner_user_id: string;
11
+ }
12
+
13
+ /** https://discord.com/developers/docs/topics/teams#data-models-team-member-object */
14
+ export interface RawTeamMember {
15
+ membership_state: number;
16
+ team_id: string;
17
+ user: RawUser;
18
+ role: TeamMemberRoleTypes;
19
+ }
20
+
21
+ export interface JSONTeam {
22
+ icon: string | null;
23
+ id: string;
24
+ members: Array<JSONTeamMember>;
25
+ name: string;
26
+ ownerUserId: string;
27
+ }
28
+
29
+ export interface JSONTeamMember {
30
+ membershipState: number;
31
+ teamId: string;
32
+ user: JSONUser;
33
+ role: TeamMemberRoleTypes;
34
+ }