oceanic.js 1.10.1-dev.97cef9c → 1.10.1-dev.9b37972

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 (204) hide show
  1. package/dist/package.json +5 -5
  2. package/esm.mjs +2 -0
  3. package/package.json +5 -5
  4. package/dist/lib/Client.d.ts +0 -91
  5. package/dist/lib/Client.js +0 -254
  6. package/dist/lib/Constants.d.ts +0 -1121
  7. package/dist/lib/Constants.js +0 -1401
  8. package/dist/lib/gateway/Shard.d.ts +0 -77
  9. package/dist/lib/gateway/Shard.js +0 -1582
  10. package/dist/lib/gateway/ShardManager.d.ts +0 -26
  11. package/dist/lib/gateway/ShardManager.js +0 -304
  12. package/dist/lib/index.d.ts +0 -83
  13. package/dist/lib/index.js +0 -166
  14. package/dist/lib/rest/Bucket.d.ts +0 -33
  15. package/dist/lib/rest/Bucket.js +0 -78
  16. package/dist/lib/rest/DiscordHTTPError.d.ts +0 -16
  17. package/dist/lib/rest/DiscordHTTPError.js +0 -65
  18. package/dist/lib/rest/DiscordRESTError.d.ts +0 -19
  19. package/dist/lib/rest/DiscordRESTError.js +0 -89
  20. package/dist/lib/rest/OAuthHelper.d.ts +0 -60
  21. package/dist/lib/rest/OAuthHelper.js +0 -180
  22. package/dist/lib/rest/RESTManager.d.ts +0 -42
  23. package/dist/lib/rest/RESTManager.js +0 -82
  24. package/dist/lib/rest/RequestHandler.d.ts +0 -28
  25. package/dist/lib/rest/RequestHandler.js +0 -313
  26. package/dist/lib/rest/SequentialBucket.d.ts +0 -25
  27. package/dist/lib/rest/SequentialBucket.js +0 -76
  28. package/dist/lib/routes/Applications.d.ts +0 -171
  29. package/dist/lib/routes/Applications.js +0 -447
  30. package/dist/lib/routes/Channels.d.ts +0 -391
  31. package/dist/lib/routes/Channels.js +0 -1107
  32. package/dist/lib/routes/Guilds.d.ts +0 -606
  33. package/dist/lib/routes/Guilds.js +0 -1669
  34. package/dist/lib/routes/Interactions.d.ts +0 -74
  35. package/dist/lib/routes/Interactions.js +0 -141
  36. package/dist/lib/routes/Miscellaneous.d.ts +0 -25
  37. package/dist/lib/routes/Miscellaneous.js +0 -54
  38. package/dist/lib/routes/OAuth.d.ts +0 -105
  39. package/dist/lib/routes/OAuth.js +0 -309
  40. package/dist/lib/routes/Users.d.ts +0 -32
  41. package/dist/lib/routes/Users.js +0 -59
  42. package/dist/lib/routes/Webhooks.d.ts +0 -128
  43. package/dist/lib/routes/Webhooks.js +0 -264
  44. package/dist/lib/structures/AnnouncementChannel.d.ts +0 -36
  45. package/dist/lib/structures/AnnouncementChannel.js +0 -47
  46. package/dist/lib/structures/AnnouncementThreadChannel.d.ts +0 -18
  47. package/dist/lib/structures/AnnouncementThreadChannel.js +0 -27
  48. package/dist/lib/structures/Application.d.ts +0 -68
  49. package/dist/lib/structures/Application.js +0 -178
  50. package/dist/lib/structures/ApplicationCommand.d.ts +0 -74
  51. package/dist/lib/structures/ApplicationCommand.js +0 -141
  52. package/dist/lib/structures/Attachment.d.ts +0 -34
  53. package/dist/lib/structures/Attachment.js +0 -64
  54. package/dist/lib/structures/AuditLogEntry.d.ts +0 -25
  55. package/dist/lib/structures/AuditLogEntry.js +0 -53
  56. package/dist/lib/structures/AutoModerationRule.d.ts +0 -49
  57. package/dist/lib/structures/AutoModerationRule.js +0 -139
  58. package/dist/lib/structures/AutocompleteInteraction.d.ts +0 -62
  59. package/dist/lib/structures/AutocompleteInteraction.js +0 -115
  60. package/dist/lib/structures/Base.d.ts +0 -20
  61. package/dist/lib/structures/Base.js +0 -58
  62. package/dist/lib/structures/BaseEntitlement.d.ts +0 -19
  63. package/dist/lib/structures/BaseEntitlement.js +0 -44
  64. package/dist/lib/structures/CategoryChannel.d.ts +0 -41
  65. package/dist/lib/structures/CategoryChannel.js +0 -105
  66. package/dist/lib/structures/Channel.d.ts +0 -20
  67. package/dist/lib/structures/Channel.js +0 -91
  68. package/dist/lib/structures/ClientApplication.d.ts +0 -153
  69. package/dist/lib/structures/ClientApplication.js +0 -220
  70. package/dist/lib/structures/CommandInteraction.d.ts +0 -127
  71. package/dist/lib/structures/CommandInteraction.js +0 -297
  72. package/dist/lib/structures/ComponentInteraction.d.ts +0 -137
  73. package/dist/lib/structures/ComponentInteraction.js +0 -311
  74. package/dist/lib/structures/Entitlement.d.ts +0 -12
  75. package/dist/lib/structures/Entitlement.js +0 -26
  76. package/dist/lib/structures/ExtendedUser.d.ts +0 -26
  77. package/dist/lib/structures/ExtendedUser.js +0 -57
  78. package/dist/lib/structures/ForumChannel.d.ts +0 -11
  79. package/dist/lib/structures/ForumChannel.js +0 -19
  80. package/dist/lib/structures/GroupChannel.d.ts +0 -62
  81. package/dist/lib/structures/GroupChannel.js +0 -133
  82. package/dist/lib/structures/Guild.d.ts +0 -654
  83. package/dist/lib/structures/Guild.js +0 -1319
  84. package/dist/lib/structures/GuildChannel.d.ts +0 -34
  85. package/dist/lib/structures/GuildChannel.js +0 -75
  86. package/dist/lib/structures/GuildPreview.d.ts +0 -50
  87. package/dist/lib/structures/GuildPreview.js +0 -119
  88. package/dist/lib/structures/GuildScheduledEvent.d.ts +0 -60
  89. package/dist/lib/structures/GuildScheduledEvent.js +0 -154
  90. package/dist/lib/structures/GuildTemplate.d.ts +0 -55
  91. package/dist/lib/structures/GuildTemplate.js +0 -126
  92. package/dist/lib/structures/Integration.d.ts +0 -54
  93. package/dist/lib/structures/Integration.js +0 -156
  94. package/dist/lib/structures/Interaction.d.ts +0 -40
  95. package/dist/lib/structures/Interaction.js +0 -91
  96. package/dist/lib/structures/InteractionResolvedChannel.d.ts +0 -28
  97. package/dist/lib/structures/InteractionResolvedChannel.js +0 -45
  98. package/dist/lib/structures/Invite.d.ts +0 -64
  99. package/dist/lib/structures/Invite.js +0 -193
  100. package/dist/lib/structures/InviteGuild.d.ts +0 -52
  101. package/dist/lib/structures/InviteGuild.js +0 -88
  102. package/dist/lib/structures/MediaChannel.d.ts +0 -11
  103. package/dist/lib/structures/MediaChannel.js +0 -19
  104. package/dist/lib/structures/Member.d.ts +0 -122
  105. package/dist/lib/structures/Member.js +0 -255
  106. package/dist/lib/structures/Message.d.ts +0 -183
  107. package/dist/lib/structures/Message.js +0 -455
  108. package/dist/lib/structures/ModalSubmitInteraction.d.ts +0 -128
  109. package/dist/lib/structures/ModalSubmitInteraction.js +0 -240
  110. package/dist/lib/structures/OAuthApplication.d.ts +0 -79
  111. package/dist/lib/structures/OAuthApplication.js +0 -210
  112. package/dist/lib/structures/OAuthGuild.d.ts +0 -35
  113. package/dist/lib/structures/OAuthGuild.js +0 -61
  114. package/dist/lib/structures/PartialApplication.d.ts +0 -30
  115. package/dist/lib/structures/PartialApplication.js +0 -67
  116. package/dist/lib/structures/Permission.d.ts +0 -21
  117. package/dist/lib/structures/Permission.js +0 -68
  118. package/dist/lib/structures/PermissionOverwrite.d.ts +0 -26
  119. package/dist/lib/structures/PermissionOverwrite.js +0 -49
  120. package/dist/lib/structures/PingInteraction.d.ts +0 -16
  121. package/dist/lib/structures/PingInteraction.js +0 -26
  122. package/dist/lib/structures/PrivateChannel.d.ts +0 -90
  123. package/dist/lib/structures/PrivateChannel.js +0 -131
  124. package/dist/lib/structures/PrivateThreadChannel.d.ts +0 -18
  125. package/dist/lib/structures/PrivateThreadChannel.js +0 -27
  126. package/dist/lib/structures/PublicThreadChannel.d.ts +0 -21
  127. package/dist/lib/structures/PublicThreadChannel.js +0 -37
  128. package/dist/lib/structures/Role.d.ts +0 -50
  129. package/dist/lib/structures/Role.js +0 -131
  130. package/dist/lib/structures/SKU.d.ts +0 -32
  131. package/dist/lib/structures/SKU.js +0 -53
  132. package/dist/lib/structures/StageChannel.d.ts +0 -33
  133. package/dist/lib/structures/StageChannel.js +0 -44
  134. package/dist/lib/structures/StageInstance.d.ts +0 -36
  135. package/dist/lib/structures/StageInstance.js +0 -94
  136. package/dist/lib/structures/Team.d.ts +0 -22
  137. package/dist/lib/structures/Team.js +0 -67
  138. package/dist/lib/structures/TestEntitlement.d.ts +0 -10
  139. package/dist/lib/structures/TestEntitlement.js +0 -21
  140. package/dist/lib/structures/TextChannel.d.ts +0 -34
  141. package/dist/lib/structures/TextChannel.js +0 -46
  142. package/dist/lib/structures/TextableChannel.d.ts +0 -158
  143. package/dist/lib/structures/TextableChannel.js +0 -276
  144. package/dist/lib/structures/TextableVoiceChannel.d.ts +0 -39
  145. package/dist/lib/structures/TextableVoiceChannel.js +0 -81
  146. package/dist/lib/structures/ThreadChannel.d.ts +0 -159
  147. package/dist/lib/structures/ThreadChannel.js +0 -295
  148. package/dist/lib/structures/ThreadOnlyChannel.d.ts +0 -99
  149. package/dist/lib/structures/ThreadOnlyChannel.js +0 -233
  150. package/dist/lib/structures/ThreadableChannel.d.ts +0 -36
  151. package/dist/lib/structures/ThreadableChannel.js +0 -58
  152. package/dist/lib/structures/UnavailableGuild.d.ts +0 -11
  153. package/dist/lib/structures/UnavailableGuild.js +0 -21
  154. package/dist/lib/structures/User.d.ts +0 -82
  155. package/dist/lib/structures/User.js +0 -168
  156. package/dist/lib/structures/VoiceChannel.d.ts +0 -20
  157. package/dist/lib/structures/VoiceChannel.js +0 -35
  158. package/dist/lib/structures/VoiceState.d.ts +0 -51
  159. package/dist/lib/structures/VoiceState.js +0 -140
  160. package/dist/lib/structures/Webhook.d.ts +0 -129
  161. package/dist/lib/structures/Webhook.js +0 -206
  162. package/dist/lib/types/applications.d.ts +0 -448
  163. package/dist/lib/types/audit-log.d.ts +0 -121
  164. package/dist/lib/types/auto-moderation.d.ts +0 -99
  165. package/dist/lib/types/channels.d.ts +0 -1150
  166. package/dist/lib/types/client.d.ts +0 -228
  167. package/dist/lib/types/events.d.ts +0 -260
  168. package/dist/lib/types/gateway-raw.d.ts +0 -567
  169. package/dist/lib/types/gateway.d.ts +0 -338
  170. package/dist/lib/types/guild-template.d.ts +0 -33
  171. package/dist/lib/types/guilds.d.ts +0 -854
  172. package/dist/lib/types/index.d.ts +0 -18
  173. package/dist/lib/types/interactions.d.ts +0 -376
  174. package/dist/lib/types/json.d.ts +0 -709
  175. package/dist/lib/types/misc.d.ts +0 -13
  176. package/dist/lib/types/oauth.d.ts +0 -201
  177. package/dist/lib/types/request-handler.d.ts +0 -52
  178. package/dist/lib/types/scheduled-events.d.ts +0 -88
  179. package/dist/lib/types/shared.d.ts +0 -9
  180. package/dist/lib/types/users.d.ts +0 -45
  181. package/dist/lib/types/voice.d.ts +0 -45
  182. package/dist/lib/types/webhooks.d.ts +0 -73
  183. package/dist/lib/util/Collection.d.ts +0 -47
  184. package/dist/lib/util/Collection.js +0 -78
  185. package/dist/lib/util/Errors.d.ts +0 -29
  186. package/dist/lib/util/Errors.js +0 -56
  187. package/dist/lib/util/Routes.d.ts +0 -124
  188. package/dist/lib/util/Routes.js +0 -243
  189. package/dist/lib/util/SimpleCollection.d.ts +0 -12
  190. package/dist/lib/util/SimpleCollection.js +0 -81
  191. package/dist/lib/util/TypedCollection.d.ts +0 -24
  192. package/dist/lib/util/TypedCollection.js +0 -76
  193. package/dist/lib/util/TypedEmitter.d.ts +0 -19
  194. package/dist/lib/util/TypedEmitter.js +0 -19
  195. package/dist/lib/util/Util.d.ts +0 -52
  196. package/dist/lib/util/Util.js +0 -469
  197. package/dist/lib/util/interactions/InteractionOptionsWrapper.d.ts +0 -170
  198. package/dist/lib/util/interactions/InteractionOptionsWrapper.js +0 -213
  199. package/dist/lib/util/interactions/MessageInteractionResponse.d.ts +0 -24
  200. package/dist/lib/util/interactions/MessageInteractionResponse.js +0 -28
  201. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.d.ts +0 -24
  202. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.js +0 -34
  203. package/dist/lib/util/interactions/SelectMenuValuesWrapper.d.ts +0 -60
  204. package/dist/lib/util/interactions/SelectMenuValuesWrapper.js +0 -124
@@ -1,338 +0,0 @@
1
- /** @module Types/Gateway */
2
- import type { PartialEmoji } from ".";
3
- import type { RawUser } from "./users";
4
- import type { AutoModerationAction, RawAutoModerationAction } from "./auto-moderation";
5
- import type {
6
- ActivityTypes,
7
- AnimationTypes,
8
- AutoModerationTriggerTypes,
9
- ChannelTypes,
10
- IntentNames
11
- } from "../Constants";
12
- import type AutoModerationRule from "../structures/AutoModerationRule";
13
- import type Shard from "../gateway/Shard";
14
- import type { ClientOptions as WSClientOptions } from "ws";
15
-
16
- export type ReconnectDelayFunction = (lastDelay: number, attempts: number) => number;
17
- export type GetGatewayOverrideFunction = () => GetGatewayResponse;
18
- export type GetBotGatewayOverrideFunction = (response: GetBotGatewayResponse) => GetBotGatewayResponse;
19
- export type GetBotGatewayFullOverrideFunction = () => GetBotGatewayResponse;
20
- interface GatewayOptions {
21
- /**
22
- * If dropped connections should be automatically reconnected.
23
- * @defaultValue true
24
- */
25
- autoReconnect?: boolean;
26
- /**
27
- * If packets to and from Discord should be compressed.
28
- * @defaultValue false
29
- */
30
- compress?: boolean;
31
- /**
32
- * The concurrency for shard connections. If you don't know what this is, don't mess with it. Only bots in >150,000 servers can use any non-default value.
33
- * @defaultValue 1
34
- */
35
- concurrency?: number | "auto";
36
- /**
37
- * The `properties` used when identifying.
38
- */
39
- connectionProperties?: {
40
- /**
41
- * The browser of the client. For example, "Discord Android" or "Discord iOS" to show as mobile.
42
- * @defaultValue Oceanic
43
- */
44
- browser?: string;
45
- /**
46
- * The device of the client.
47
- * @defaultValue Oceanic
48
- */
49
- device?: string;
50
- /**
51
- * The operating system of the client.
52
- * @defaultValue `process.platform()`
53
- */
54
- os?: string;
55
- };
56
- /**
57
- * The maximum amount of time in milliseconds to wait for a connection to be established.
58
- * @defaultValue 30000
59
- */
60
- connectionTimeout?: number;
61
- /**
62
- * The ID of the first shard to run for this client. Mutually exclusive with `shardIDs`.
63
- * @defaultValue 0
64
- */
65
- firstShardID?: number;
66
- /**
67
- * If the members of all guilds should be requested. Requires the `GUILD_MEMBERS` intent.
68
- * @defaultValue false
69
- */
70
- getAllUsers?: boolean;
71
- /**
72
- * The time in milliseconds after which the client will consider all guilds to have been received.
73
- * @defaultValue 2000
74
- */
75
- guildCreateTimeout?: number;
76
- /**
77
- * The [intents](https://discord.com/developers/docs/topics/gateway#list-of-intents) to use. Either a number, array of intent names, array of numbers, or "ALL"/"ALL_NON_PRIVILEGED". All non privileged intents are used by default.
78
- * @defaultValue {@link Constants~AllNonPrivilegedIntents | All Non Privileged Intents}
79
- */
80
- intents?: number | Array<IntentNames | "ALL" | "ALL_NON_PRIVILEGED" | number>;
81
- /**
82
- * The threshold at which guilds are considered "large" (after which offline members will not be loaded).
83
- * @defaultValue 250
84
- */
85
- largeThreshold?: number;
86
- /**
87
- * The ID of the last shard to run for this client. Mutually exclusive with `shardIDs`.
88
- * @defaultValue maxShards - 1
89
- */
90
- lastShardID?: number;
91
- /**
92
- * The maximum number of attempts to reconnect.
93
- * @defaultValue Infinity
94
- */
95
- maxReconnectAttempts?: number;
96
- /**
97
- * The maximum number of attempts to resume a lost connection.
98
- * @defaultValue 10
99
- */
100
- maxResumeAttempts?: number;
101
- /**
102
- * The total number of shards across all running clients. Limit the number of shards per client via `firstShardID` & `lastShardID`.
103
- * @defaultValue 1
104
- */
105
- maxShards?: number | "auto";
106
- /** Options for overriding default gateway behavior. */
107
- override?: OverrideOptions;
108
- /** The initial presence to use when connecting. */
109
- presence?: UpdatePresenceOptions;
110
- /**
111
- * A function to calculate the delay between reconnect attempts.
112
- * @defaultValue (lastDelay, attempts) => Math.pow(attempts + 1, 0.7) * 20000
113
- */
114
- reconnectDelay?: ReconnectDelayFunction;
115
- /**
116
- * If a check should be made before connecting, which will remove any disallowed intents. This requires making a request to {@link REST/MApplications.getCurrent | `/applications/@me`}. Any removed intents will be emitted via the `warn` event.
117
- * @defaultValue false
118
- */
119
- removeDisallowedIntents?: boolean;
120
- /**
121
- * If existing voice connections should be populated. This will disconnect connections from other sessions.
122
- * @defaultValue false
123
- */
124
- seedVoiceConnections?: boolean;
125
- /**
126
- * An array of shard IDs to run for this client. Mutually exclusive with `firstShardID` & `lastShardID`.
127
- * @defaultValue based on `firstShardID` & `lastShardID`
128
- */
129
- shardIDs?: Array<number>;
130
- /** The options to pass to constructed websockets. */
131
- ws?: WSClientOptions;
132
- }
133
-
134
- export interface OverrideOptions {
135
- /**
136
- * If the compression/version information should be appended to the query.
137
- * @defaultValue true if `getBot` and `url` are undefined, false otherwise
138
- */
139
- appendQuery?: boolean;
140
- /**
141
- * If the gateway url should be used for resuming.
142
- * @defaultValue false if `getBot` or `url` are present, true otherwise
143
- */
144
- gatewayURLIsResumeURL?: boolean;
145
- /**
146
- * The amount time in milliseconds to wait between shard connects. Discord only allows one connection per 5 seconds.
147
- * @defaultValue 5000
148
- */
149
- timeBetweenShardConnects?: number;
150
- /** Replaces the response normally recieved from `GET /gateway/bot`. The `url` function below will override the value returned here. */
151
- getBot?(): Promise<GetBotGatewayResponse>;
152
- /** Replaces the `resume_url` recieved from Discord. */
153
- resumeURL?(shard: Shard, totalShards: number): Promise<string>;
154
- /** Replaces the gateway url shards connect to. This WILL be called multiple times if you have more than one shard, be sure to cache its results if you do anythng that isn't quickly repeatable. */
155
- url?(shard: Shard, totalShards: number): Promise<string>;
156
- }
157
-
158
- export interface ShardManagerInstanceOptions extends Required<Omit<GatewayOptions, "concurrency" | "connectionProperties" | "intents" | "maxShards" | "presence" | "override">> {
159
- concurrency: number;
160
- connectionProperties: Required<GatewayOptions["connectionProperties"]>;
161
- intents: number;
162
- maxShards: number;
163
- override: Omit<OverrideOptions, "appendQuery" | "gatewayURLIsResumeURL" | "timeBetweenShardConnects"> & Required<Pick<OverrideOptions, "appendQuery" | "gatewayURLIsResumeURL" | "timeBetweenShardConnects">>;
164
- presence: Required<UpdatePresenceOptions>;
165
- }
166
-
167
- export interface GetGatewayResponse {
168
- url: string;
169
- }
170
-
171
- export interface RawGetBotGatewayResponse extends GetGatewayResponse {
172
- session_start_limit: RawSessionStartLimit;
173
- shards: number;
174
- }
175
-
176
- export interface RawSessionStartLimit {
177
- max_concurrency: number;
178
- remaining: number;
179
- reset_after: number;
180
- total: number;
181
- }
182
-
183
- export interface SessionStartLimit {
184
- maxConcurrency: number;
185
- remaining: number;
186
- resetAfter: number;
187
- total: number;
188
- }
189
-
190
-
191
- export interface GetBotGatewayResponse extends GetGatewayResponse {
192
- sessionStartLimit: SessionStartLimit;
193
- shards: number;
194
- }
195
-
196
- export interface RequestGuildMembersOptions {
197
- /** The maximum number of members to request. */
198
- limit?: number;
199
- /**
200
- * If presences should be requested. Requires the `GUILD_PRESENCES` intent.
201
- * @defaultValue false
202
- */
203
- presences?: boolean;
204
- /** If provided, only members with a username that starts with this string will be returned. If empty or not provided, requires the `GUILD_MEMBERS` intent. */
205
- query?: string;
206
- /**
207
- * The maximum amount of time in milliseconds to wait.
208
- * @defaultValue `client.rest.options.requestTimeout`
209
- */
210
- timeout?: number;
211
- /** The IDs of up to 100 users to specifically request. */
212
- userIDs?: Array<string>;
213
- }
214
-
215
- export type MutualStatuses = "online" | "dnd" | "idle";
216
- export type SendStatuses = MutualStatuses | "invisible";
217
- export type ReceiveStatuses = MutualStatuses | "offline";
218
-
219
- export interface UpdatePresenceOptions {
220
- /** An array of activities. */
221
- activities?: Array<BotActivity>;
222
- /** If the client is afk. */
223
- afk?: boolean;
224
- /** The [status](https://discord.com/developers/docs/topics/gateway#update-presence-status-types). */
225
- status: SendStatuses;
226
- }
227
-
228
- export interface Activity {
229
- application_id?: string;
230
- assets?: Partial<Record<"large_image" | "large_text" | "small_image" | "small_text", string>>;
231
- buttons?: Array<ActivityButton>;
232
- created_at: number;
233
- details?: string | null;
234
- emoji?: ActivityEmoji | null;
235
- flags?: number;
236
- instance?: boolean;
237
- name: string;
238
- party?: ActivityParty;
239
- secrets?: Partial<Record<"join" | "spectate" | "match", string>>;
240
- state?: string | null;
241
- timestamps?: Partial<Record<"end" | "start", number>>;
242
- type: ActivityTypes;
243
- url?: string | null;
244
- }
245
- export interface BotActivity extends Pick<Activity, "name" | "url" | "state" | "type"> {}
246
-
247
- export interface ActivityEmoji {
248
- animated?: boolean;
249
- id?: string;
250
- name: string;
251
- }
252
-
253
- export interface ActivityParty {
254
- id?: string;
255
- size?: [currentSize: number, maxSize: number];
256
- }
257
-
258
- export interface ActivityButton {
259
- label: string;
260
- url: string;
261
- }
262
-
263
- export interface PresenceUpdate {
264
- activities?: Array<Activity>;
265
- client_status: ClientStatus;
266
- guild_id: string;
267
- status: ReceiveStatuses;
268
- user: { id: string; } & Partial<Omit<RawUser, "id">>;
269
- }
270
-
271
- export interface ClientStatus {
272
- desktop?: string;
273
- mobile?: string;
274
- web?: string;
275
- }
276
-
277
- export interface UpdateVoiceStateOptions {
278
- /** If the client should be self deafened. */
279
- selfDeaf?: boolean;
280
- /** If the client should be self muted. */
281
- selfMute?: boolean;
282
- }
283
-
284
- export interface RawAutoModerationActionExecution {
285
- action: RawAutoModerationAction;
286
- alert_system_message_id?: string;
287
- channel_id?: string;
288
- content: string;
289
- guild_id: string;
290
- matched_content: string;
291
- matched_keyword: string | null;
292
- message_id?: string;
293
- rule_id: string;
294
- rule_trigger_type: AutoModerationTriggerTypes;
295
- user_id: string;
296
- }
297
-
298
- export interface AutoModerationActionExecution {
299
- action: AutoModerationAction;
300
- alertSystemMessageID?: string;
301
- content: string;
302
- matchedContent: string;
303
- matchedKeyword: string | null;
304
- messageID?: string;
305
- rule?: AutoModerationRule;
306
- ruleID: string;
307
- ruleTriggerType: AutoModerationTriggerTypes;
308
- }
309
-
310
- export type ShardStatus = "connecting" | "disconnected" | "handshaking" | "identifying" | "ready" | "resuming";
311
-
312
- export interface RawDeletedPrivateChannel {
313
- flags: number;
314
- id: string;
315
- last_message_id: string | null;
316
- type: ChannelTypes.DM;
317
- }
318
-
319
- export interface DeletedPrivateChannel {
320
- flags: number;
321
- id: string;
322
- lastMessageID: string | null;
323
- type: ChannelTypes.DM;
324
- }
325
-
326
- export interface RawVoiceChannelEffect {
327
- animation_id?: number;
328
- animation_type?: AnimationTypes;
329
- channel_id: string;
330
- emoji?: PartialEmoji | null;
331
- guild_id: string;
332
- user_id: string;
333
- }
334
-
335
- export interface VoiceChannelEffect {
336
- animationID?: number;
337
- animationType?: AnimationTypes;
338
- }
@@ -1,33 +0,0 @@
1
- /** @module Types/GuildTemplate */
2
- import type { RawGuild } from "./guilds";
3
- import type { RawUser } from "./users";
4
-
5
- export interface RawGuildTemplate {
6
- code: string;
7
- created_at: string;
8
- creator: RawUser;
9
- creator_id: string;
10
- description: string | null;
11
- is_dirty: boolean | null;
12
- name: string;
13
- serialized_source_guild: Partial<RawGuild>;
14
- source_guild_id: string;
15
- updated_at: string;
16
- usage_count: number;
17
- }
18
-
19
- export interface CreateGuildFromTemplateOptions {
20
- /** The icon for the created guild (buffer, or full data url). */
21
- icon?: Buffer | string;
22
- /** The name of the guild. */
23
- name: string;
24
- }
25
-
26
- export interface CreateTemplateOptions {
27
- /** The description of the template. */
28
- description?: string | null;
29
- /** The name of the template. */
30
- name: string;
31
- }
32
-
33
- export interface EditGuildTemplateOptions extends Partial<CreateTemplateOptions> {}