oceanic.js 1.7.2-dev.cb5dbee → 1.7.2-dev.de121d7
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.
- package/dist/lib/Client.d.ts +5 -5
- package/dist/lib/Client.js +9 -3
- package/dist/lib/Constants.d.ts +2 -2
- package/dist/lib/Constants.js +3 -3
- package/dist/lib/gateway/Shard.js +7 -21
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +4 -2
- package/dist/lib/routes/ApplicationCommands.d.ts +15 -0
- package/dist/lib/routes/ApplicationCommands.js +16 -1
- package/dist/lib/routes/Channels.d.ts +71 -1
- package/dist/lib/routes/Channels.js +77 -10
- package/dist/lib/routes/Guilds.d.ts +113 -8
- package/dist/lib/routes/Guilds.js +143 -41
- package/dist/lib/routes/Interactions.d.ts +8 -0
- package/dist/lib/routes/Interactions.js +9 -1
- package/dist/lib/routes/Miscellaneous.d.ts +6 -0
- package/dist/lib/routes/Miscellaneous.js +8 -2
- package/dist/lib/routes/OAuth.d.ts +15 -2
- package/dist/lib/routes/OAuth.js +16 -3
- package/dist/lib/routes/Users.d.ts +4 -2
- package/dist/lib/routes/Users.js +5 -3
- package/dist/lib/routes/Webhooks.d.ts +14 -0
- package/dist/lib/routes/Webhooks.js +15 -16
- package/dist/lib/structures/CategoryChannel.d.ts +1 -1
- package/dist/lib/structures/CategoryChannel.js +1 -1
- package/dist/lib/structures/GroupChannel.d.ts +1 -1
- package/dist/lib/structures/GroupChannel.js +7 -11
- package/dist/lib/structures/Guild.d.ts +17 -17
- package/dist/lib/structures/Guild.js +35 -23
- package/dist/lib/structures/Message.d.ts +1 -1
- package/dist/lib/structures/Message.js +1 -1
- package/dist/lib/structures/PrivateChannel.d.ts +1 -1
- package/dist/lib/structures/PrivateChannel.js +1 -1
- package/dist/lib/structures/TextableChannel.d.ts +2 -2
- package/dist/lib/structures/TextableChannel.js +1 -1
- package/dist/lib/structures/TextableVoiceChannel.d.ts +1 -1
- package/dist/lib/structures/TextableVoiceChannel.js +1 -1
- package/dist/lib/structures/ThreadChannel.d.ts +1 -1
- package/dist/lib/structures/ThreadChannel.js +1 -1
- package/dist/lib/structures/ThreadOnlyChannel.d.ts +3 -3
- package/dist/lib/structures/ThreadOnlyChannel.js +5 -4
- package/dist/lib/types/client.d.ts +20 -0
- package/dist/lib/types/interactions.d.ts +10 -10
- package/dist/lib/util/SimpleCollection.d.ts +12 -0
- package/dist/lib/util/SimpleCollection.js +81 -0
- package/dist/lib/util/TypedCollection.d.ts +12 -4
- package/dist/lib/util/TypedCollection.js +19 -6
- package/dist/lib/util/Util.d.ts +2 -1
- package/dist/lib/util/Util.js +14 -6
- package/dist/package.json +4 -4
- package/esm.mjs +2 -0
- package/package.json +4 -4
|
@@ -30,33 +30,38 @@ export default class Guilds {
|
|
|
30
30
|
* @param guildID The ID of the guild.
|
|
31
31
|
* @param userID The ID of the user to add.
|
|
32
32
|
* @param options The options for adding the member.
|
|
33
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
34
|
+
* @caches {@link Guild#members | Guild#members}
|
|
33
35
|
*/
|
|
34
|
-
addMember(guildID: string, userID: string, options: AddMemberOptions): Promise<
|
|
36
|
+
addMember(guildID: string, userID: string, options: AddMemberOptions): Promise<Member | undefined>;
|
|
35
37
|
/**
|
|
36
38
|
* Add a role to a member.
|
|
37
39
|
* @param guildID The ID of the guild.
|
|
38
40
|
* @param memberID The ID of the member.
|
|
39
41
|
* @param roleID The ID of the role to add.
|
|
40
42
|
* @param reason The reason for adding the role.
|
|
43
|
+
* @caching This method **does not** cache its result.
|
|
41
44
|
*/
|
|
42
45
|
addMemberRole(guildID: string, memberID: string, roleID: string, reason?: string): Promise<void>;
|
|
43
46
|
/**
|
|
44
47
|
* Begin a prune.
|
|
45
48
|
* @param guildID The ID of the guild.
|
|
46
49
|
* @param options The options for the prune.
|
|
50
|
+
* @caching This method **does not** cache its result.
|
|
47
51
|
*/
|
|
48
52
|
beginPrune(guildID: string, options?: BeginPruneOptions): Promise<number | null>;
|
|
49
53
|
/**
|
|
50
54
|
* Create a guild. This can only be used by bots in under 10 guilds.
|
|
51
|
-
*
|
|
52
|
-
* Note: This does NOT add the guild to the client's cache.
|
|
53
55
|
* @param options The options for creating the guild.
|
|
56
|
+
* @caching This method **does not** cache its result.
|
|
54
57
|
*/
|
|
55
58
|
create(options: CreateGuildOptions): Promise<Guild>;
|
|
56
59
|
/**
|
|
57
60
|
* Create an auto moderation rule for a guild.
|
|
58
61
|
* @param guildID The ID of the guild.
|
|
59
62
|
* @param options The options for creating the rule.
|
|
63
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
64
|
+
* @caches {@link Guild#autoModerationRules | Guild#autoModerationRules}
|
|
60
65
|
*/
|
|
61
66
|
createAutoModerationRule(guildID: string, options: CreateAutoModerationRuleOptions): Promise<AutoModerationRule>;
|
|
62
67
|
/**
|
|
@@ -64,18 +69,23 @@ export default class Guilds {
|
|
|
64
69
|
* @param guildID The ID of the guild.
|
|
65
70
|
* @param userID The ID of the user to ban.
|
|
66
71
|
* @param options The options for creating the ban.
|
|
72
|
+
* @caching This method **does not** cache its result.
|
|
67
73
|
*/
|
|
68
74
|
createBan(guildID: string, userID: string, options?: CreateBanOptions): Promise<void>;
|
|
69
75
|
/**
|
|
70
76
|
* Create a channel in a guild.
|
|
71
77
|
* @param guildID The ID of the guild.
|
|
72
78
|
* @param options The options for creating the channel.
|
|
79
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
80
|
+
* @caches {@link Guild#channels | Guild#channels}
|
|
73
81
|
*/
|
|
74
82
|
createChannel<T extends GuildChannelsWithoutThreads>(guildID: string, type: T, options: Omit<CreateChannelOptions, "type">): Promise<ChannelTypeMap[T]>;
|
|
75
83
|
/**
|
|
76
84
|
* Create an emoji in a guild.
|
|
77
85
|
* @param guildID The ID of the guild.
|
|
78
86
|
* @param options The options for creating the emoji.
|
|
87
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
88
|
+
* @caches {@link Guild#emojis | Guild#emojis}<br>{@link Client#users | Client#users} (creator, if applicable)
|
|
79
89
|
*/
|
|
80
90
|
createEmoji(guildID: string, options: CreateEmojiOptions): Promise<GuildEmoji>;
|
|
81
91
|
/**
|
|
@@ -84,24 +94,31 @@ export default class Guilds {
|
|
|
84
94
|
* Note: This does NOT add the guild to the client's cache.
|
|
85
95
|
* @param code The code of the template to use.
|
|
86
96
|
* @param options The options for creating the guild.
|
|
97
|
+
* @caching This method **does not** cache its result.
|
|
87
98
|
*/
|
|
88
99
|
createFromTemplate(code: string, options: CreateGuildFromTemplateOptions): Promise<Guild>;
|
|
89
100
|
/**
|
|
90
101
|
* Create a role.
|
|
91
102
|
* @param guildID The ID of the guild.
|
|
92
103
|
* @param options The options for creating the role.
|
|
104
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
105
|
+
* @caches {@link Guild#roles | Guild#roles}
|
|
93
106
|
*/
|
|
94
107
|
createRole(guildID: string, options?: CreateRoleOptions): Promise<Role>;
|
|
95
108
|
/**
|
|
96
109
|
* Create a scheduled event in a guild.
|
|
97
110
|
* @param guildID The ID of the guild.
|
|
98
111
|
* @param options The options for creating the scheduled event.
|
|
112
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
113
|
+
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
|
|
99
114
|
*/
|
|
100
115
|
createScheduledEvent(guildID: string, options: CreateScheduledEventOptions): Promise<GuildScheduledEvent>;
|
|
101
116
|
/**
|
|
102
117
|
* Create a sticker.
|
|
103
118
|
* @param guildID The ID of the guild.
|
|
104
119
|
* @param options The options for creating the sticker.
|
|
120
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
121
|
+
* @caches {@link Guild#stickers | Guild#stickers}<br>{@link Client#users | Client#users} (creator, if applicable)
|
|
105
122
|
*/
|
|
106
123
|
createSticker(guildID: string, options: CreateStickerOptions): Promise<Sticker>;
|
|
107
124
|
/**
|
|
@@ -113,6 +130,7 @@ export default class Guilds {
|
|
|
113
130
|
/**
|
|
114
131
|
* Delete a guild.
|
|
115
132
|
* @param guildID The ID of the guild.
|
|
133
|
+
* @caching This method **does not** cache its result.
|
|
116
134
|
*/
|
|
117
135
|
delete(guildID: string): Promise<void>;
|
|
118
136
|
/**
|
|
@@ -120,6 +138,7 @@ export default class Guilds {
|
|
|
120
138
|
* @param guildID The ID of the guild.
|
|
121
139
|
* @param ruleID The ID of the rule to delete.
|
|
122
140
|
* @param reason The reason for deleting the rule.
|
|
141
|
+
* @caching This method **does not** cache its result.
|
|
123
142
|
*/
|
|
124
143
|
deleteAutoModerationRule(guildID: string, ruleID: string, reason?: string): Promise<void>;
|
|
125
144
|
/**
|
|
@@ -127,6 +146,7 @@ export default class Guilds {
|
|
|
127
146
|
* @param guildID The ID of the guild.
|
|
128
147
|
* @param emojiID The ID of the emoji.
|
|
129
148
|
* @param reason The reason for deleting the emoji.
|
|
149
|
+
* @caching This method **does not** cache its result.
|
|
130
150
|
*/
|
|
131
151
|
deleteEmoji(guildID: string, emojiID: string, reason?: string): Promise<void>;
|
|
132
152
|
/**
|
|
@@ -134,6 +154,7 @@ export default class Guilds {
|
|
|
134
154
|
* @param guildID The ID of the guild.
|
|
135
155
|
* @param integrationID The ID of the integration.
|
|
136
156
|
* @param reason The reason for deleting the integration.
|
|
157
|
+
* @caching This method **does not** cache its result.
|
|
137
158
|
*/
|
|
138
159
|
deleteIntegration(guildID: string, integrationID: string, reason?: string): Promise<void>;
|
|
139
160
|
/**
|
|
@@ -141,6 +162,7 @@ export default class Guilds {
|
|
|
141
162
|
* @param guildID The ID of the guild.
|
|
142
163
|
* @param roleID The ID of the role to delete.
|
|
143
164
|
* @param reason The reason for deleting the role.
|
|
165
|
+
* @caching This method **does not** cache its result.
|
|
144
166
|
*/
|
|
145
167
|
deleteRole(guildID: string, roleID: string, reason?: string): Promise<void>;
|
|
146
168
|
/**
|
|
@@ -148,6 +170,7 @@ export default class Guilds {
|
|
|
148
170
|
* @param guildID The ID of the guild.
|
|
149
171
|
* @param eventID The ID of the scheduled event.
|
|
150
172
|
* @param reason The reason for deleting the scheduled event. Discord's docs do not explicitly state a reason can be provided, so it may not be used.
|
|
173
|
+
* @caching This method **does not** cache its result.
|
|
151
174
|
*/
|
|
152
175
|
deleteScheduledEvent(guildID: string, eventID: string, reason?: string): Promise<void>;
|
|
153
176
|
/**
|
|
@@ -155,20 +178,22 @@ export default class Guilds {
|
|
|
155
178
|
* @param guildID The ID of the guild.
|
|
156
179
|
* @param stickerID The ID of the sticker to delete.
|
|
157
180
|
* @param reason The reason for deleting the sticker.
|
|
181
|
+
* @caching This method **does not** cache its result.
|
|
158
182
|
*/
|
|
159
183
|
deleteSticker(guildID: string, stickerID: string, reason?: string): Promise<void>;
|
|
160
184
|
/**
|
|
161
185
|
* Delete a template.
|
|
162
186
|
* @param guildID The ID of the guild.
|
|
163
187
|
* @param code The code of the template.
|
|
188
|
+
* @caching This method **does not** cache its result.
|
|
164
189
|
*/
|
|
165
190
|
deleteTemplate(guildID: string, code: string): Promise<void>;
|
|
166
191
|
/**
|
|
167
192
|
* Edit a guild.
|
|
168
|
-
*
|
|
169
|
-
* Note: If the client's cache does not already contain the guild, it will not be added.
|
|
170
193
|
* @param guildID The ID of the guild.
|
|
171
194
|
* @param options The options for editing the guild.
|
|
195
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not already cached.
|
|
196
|
+
* @caches {@link Client#guilds | Client#guilds}
|
|
172
197
|
*/
|
|
173
198
|
edit(guildID: string, options: EditGuildOptions): Promise<Guild>;
|
|
174
199
|
/**
|
|
@@ -176,73 +201,93 @@ export default class Guilds {
|
|
|
176
201
|
* @param guildID The ID of the guild.
|
|
177
202
|
* @param ruleID The ID of the rule to edit.
|
|
178
203
|
* @param options The options for editing the rule.
|
|
204
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
205
|
+
* @caches {@link Guild#autoModerationRules | Guild#autoModerationRules}
|
|
179
206
|
*/
|
|
180
207
|
editAutoModerationRule(guildID: string, ruleID: string, options: EditAutoModerationRuleOptions): Promise<AutoModerationRule>;
|
|
181
208
|
/**
|
|
182
209
|
* Edit the positions of channels in a guild.
|
|
183
210
|
* @param guildID The ID of the guild.
|
|
184
211
|
* @param options The channels to move. Unedited channels do not need to be specified.
|
|
212
|
+
* @caching This method **does not** cache its result.
|
|
185
213
|
*/
|
|
186
214
|
editChannelPositions(guildID: string, options: Array<ModifyChannelPositionsEntry>): Promise<void>;
|
|
187
215
|
/**
|
|
188
216
|
* Modify the current member in a guild.
|
|
189
217
|
* @param guildID The ID of the guild.
|
|
190
218
|
* @param options The options for editing the member.
|
|
219
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
220
|
+
* @caches {@link Guild#members | Guild#members}<br>{@link Guild#clientMember | Guild#clientMember}
|
|
191
221
|
*/
|
|
192
222
|
editCurrentMember(guildID: string, options: EditCurrentMemberOptions): Promise<Member>;
|
|
193
223
|
/**
|
|
194
224
|
* Edit the current member's voice state in a guild. `channelID` is required, and the current member must already be in that channel. See [Discord's docs](https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state-caveats) for more information.
|
|
195
225
|
* @param guildID The ID of the guild.
|
|
196
226
|
* @param options The options for editing the voice state.
|
|
227
|
+
* @caching This method **does not** cache its result.
|
|
197
228
|
*/
|
|
198
229
|
editCurrentUserVoiceState(guildID: string, options: EditCurrentUserVoiceStateOptions): Promise<void>;
|
|
199
230
|
/**
|
|
200
231
|
* Edit an existing emoji.
|
|
201
232
|
* @param guildID The ID of the guild the emoji is in.
|
|
202
233
|
* @param options The options for editing the emoji.
|
|
234
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
235
|
+
* @caches {@link Guild#emojis | Guild#emojis}
|
|
203
236
|
*/
|
|
204
237
|
editEmoji(guildID: string, emojiID: string, options: EditEmojiOptions): Promise<GuildEmoji>;
|
|
205
238
|
/**
|
|
206
239
|
* Edit the [mfa level](https://discord.com/developers/docs/resources/guild#guild-object-mfa-level) of a guild. This can only be used by the guild owner.
|
|
207
240
|
* @param guildID The ID of the guild.
|
|
208
241
|
* @param options The options for editing the MFA level.
|
|
242
|
+
* @caching This method **does not** cache its result.
|
|
209
243
|
*/
|
|
210
244
|
editMFALevel(guildID: string, options: EditMFALevelOptions): Promise<MFALevels>;
|
|
211
245
|
/**
|
|
212
|
-
* Edit a guild member. Use editCurrentMember if you wish to update the nick of this client using the CHANGE_NICKNAME permission.
|
|
246
|
+
* Edit a guild member. Use editCurrentMember if you wish to update the nick of this client using the `CHANGE_NICKNAME` permission.
|
|
213
247
|
* @param guildID The ID of the guild.
|
|
214
248
|
* @param memberID The ID of the member.
|
|
215
249
|
* @param options The options for editing the member.
|
|
250
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
251
|
+
* @caches {@link Guild#members | Guild#members}
|
|
216
252
|
*/
|
|
217
253
|
editMember(guildID: string, memberID: string, options: EditMemberOptions): Promise<Member>;
|
|
218
254
|
/**
|
|
219
255
|
* Edit a guild's onboarding configuration.
|
|
220
256
|
* @param guildID The ID of the guild.
|
|
221
257
|
* @param options The options for editing the onboarding configuration.
|
|
258
|
+
* @caching This method **does not** cache its result.
|
|
222
259
|
*/
|
|
223
260
|
editOnboarding(guildID: string, options: EditOnboardingOptions): Promise<Onboarding>;
|
|
224
261
|
/**
|
|
225
262
|
* Edit an existing role.
|
|
226
263
|
* @param guildID The ID of the guild.
|
|
227
264
|
* @param options The options for editing the role.
|
|
265
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
266
|
+
* @caches {@link Guild#roles | Guild#roles}
|
|
228
267
|
*/
|
|
229
268
|
editRole(guildID: string, roleID: string, options: EditRoleOptions): Promise<Role>;
|
|
230
269
|
/**
|
|
231
270
|
* Edit the position of roles in a guild.
|
|
232
271
|
* @param guildID The ID of the guild.
|
|
233
272
|
* @param options The roles to move.
|
|
273
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
274
|
+
* @caches {@link Guild#roles | Guild#roles}
|
|
234
275
|
*/
|
|
235
276
|
editRolePositions(guildID: string, options: Array<EditRolePositionsEntry>, reason?: string): Promise<Array<Role>>;
|
|
236
277
|
/**
|
|
237
278
|
* Edit an existing scheduled event in a guild.
|
|
238
279
|
* @param guildID The ID of the guild.
|
|
239
280
|
* @param options The options for editing the scheduled event.
|
|
281
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
282
|
+
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
|
|
240
283
|
*/
|
|
241
284
|
editScheduledEvent(guildID: string, options: EditScheduledEventOptions): Promise<GuildScheduledEvent>;
|
|
242
285
|
/**
|
|
243
286
|
* Edit a sticker.
|
|
244
287
|
* @param guildID The ID of the guild.
|
|
245
288
|
* @param options The options for editing the sticker.
|
|
289
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
290
|
+
* @caches {@link Guild#stickers | Guild#stickers}
|
|
246
291
|
*/
|
|
247
292
|
editSticker(guildID: string, stickerID: string, options: EditStickerOptions): Promise<Sticker>;
|
|
248
293
|
/**
|
|
@@ -250,6 +295,7 @@ export default class Guilds {
|
|
|
250
295
|
* @param guildID The ID of the guild.
|
|
251
296
|
* @param code The code of the template.
|
|
252
297
|
* @param options The options for editing the template.
|
|
298
|
+
* @caching This method **does not** cache its result.
|
|
253
299
|
*/
|
|
254
300
|
editTemplate(guildID: string, code: string, options: EditGuildTemplateOptions): Promise<GuildTemplate>;
|
|
255
301
|
/**
|
|
@@ -257,119 +303,153 @@ export default class Guilds {
|
|
|
257
303
|
* @param guildID The ID of the guild.
|
|
258
304
|
* @param memberID The ID of the member.
|
|
259
305
|
* @param options The options for editing the voice state.
|
|
306
|
+
* @caching This method **does not** cache its result.
|
|
260
307
|
*/
|
|
261
308
|
editUserVoiceState(guildID: string, memberID: string, options: EditUserVoiceStateOptions): Promise<void>;
|
|
262
309
|
/**
|
|
263
310
|
* Edit the welcome screen in a guild.
|
|
264
311
|
* @param guildID The ID of the guild.
|
|
265
312
|
* @param options The options for editing the welcome screen.
|
|
313
|
+
* @caching This method **does not** cache its result.
|
|
266
314
|
*/
|
|
267
315
|
editWelcomeScreen(guildID: string, options: EditWelcomeScreenOptions): Promise<WelcomeScreen>;
|
|
268
316
|
/**
|
|
269
317
|
* Edit the widget of a guild.
|
|
270
318
|
* @param guildID The ID of the guild.
|
|
271
319
|
* @param options The options for editing the widget.
|
|
320
|
+
* @caching This method **does not** cache its result.
|
|
272
321
|
*/
|
|
273
322
|
editWidget(guildID: string, options: WidgetSettings): Promise<Widget>;
|
|
274
323
|
/**
|
|
275
324
|
* Get a guild.
|
|
276
|
-
*
|
|
277
|
-
* Note: If the guild is not already in the client's cache, this will not add it.
|
|
278
325
|
* @param guildID The ID of the guild.
|
|
279
326
|
* @param withCounts If the approximate number of members and online members should be included.
|
|
327
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not already cached.
|
|
328
|
+
* @caches {@link Client#guilds | Client#guilds}
|
|
280
329
|
*/
|
|
281
330
|
get(guildID: string, withCounts?: boolean): Promise<Guild>;
|
|
282
331
|
/**
|
|
283
332
|
* Get the active threads in a guild.
|
|
284
333
|
* @param guildID The ID of the guild.
|
|
334
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
335
|
+
* @caches {@link Guild#threads | Guild#threads}
|
|
285
336
|
*/
|
|
286
337
|
getActiveThreads(guildID: string): Promise<GetActiveThreadsResponse>;
|
|
287
338
|
/**
|
|
288
339
|
* Get a guild's audit log.
|
|
289
340
|
* @param guildID The ID of the guild.
|
|
290
341
|
* @param options The options for getting the audit logs.
|
|
342
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
343
|
+
* @caches {@link Guild#autoModerationRules | Guild#autoModerationRules}<br>{@link Guild#scheduledEvents | Guild#scheduledEvents}<br>{@link Guild#integrations | Guild#integrations}<br>{@link Guild#threads | Guild#threads}<br>{@link Client#users | Client#users}
|
|
291
344
|
*/
|
|
292
345
|
getAuditLog(guildID: string, options?: GetAuditLogOptions): Promise<AuditLog>;
|
|
293
346
|
/**
|
|
294
347
|
* Get an auto moderation rule for a guild.
|
|
295
348
|
* @param guildID The ID of the guild.
|
|
296
349
|
* @param ruleID The ID of the rule to get.
|
|
350
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
351
|
+
* @caches {@link Guild#autoModerationRules | Guild#autoModerationRules}
|
|
297
352
|
*/
|
|
298
353
|
getAutoModerationRule(guildID: string, ruleID: string): Promise<AutoModerationRule>;
|
|
299
354
|
/**
|
|
300
355
|
* Get the auto moderation rules for a guild.
|
|
301
356
|
* @param guildID The ID of the guild.
|
|
357
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
358
|
+
* @caches {@link Guild#autoModerationRules | Guild#autoModerationRules}
|
|
302
359
|
*/
|
|
303
360
|
getAutoModerationRules(guildID: string): Promise<Array<AutoModerationRule>>;
|
|
304
361
|
/**
|
|
305
362
|
* Get a ban.
|
|
306
363
|
* @param guildID The ID of the guild.
|
|
307
364
|
* @param userID The ID of the user to get the ban of.
|
|
365
|
+
* @caching This method **does** cache part of its result.
|
|
366
|
+
* @caches {@link Client#users | Client#users}
|
|
308
367
|
*/
|
|
309
368
|
getBan(guildID: string, userID: string): Promise<Ban>;
|
|
310
369
|
/**
|
|
311
370
|
* Get the bans in a guild.
|
|
312
371
|
* @param guildID The ID of the guild.
|
|
313
372
|
* @param options The options for getting the bans.
|
|
373
|
+
* @caching This method **does** cache part of its result.
|
|
374
|
+
* @caches {@link Client#users | Client#users}
|
|
314
375
|
*/
|
|
315
376
|
getBans(guildID: string, options?: GetBansOptions): Promise<Array<Ban>>;
|
|
316
377
|
/**
|
|
317
378
|
* Get the channels in a guild. Does not include threads.
|
|
318
379
|
* @param guildID The ID of the guild.
|
|
380
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
381
|
+
* @caches {@link Guild#channels | Guild#channels}
|
|
319
382
|
*/
|
|
320
383
|
getChannels(guildID: string): Promise<Array<AnyGuildChannelWithoutThreads>>;
|
|
321
384
|
/**
|
|
322
385
|
* Get an emoji in a guild.
|
|
323
386
|
* @param guildID The ID of the guild.
|
|
324
387
|
* @param emojiID The ID of the emoji to get.
|
|
388
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
389
|
+
* @caches {@link Guild#emojis | Guild#emojis}
|
|
325
390
|
*/
|
|
326
391
|
getEmoji(guildID: string, emojiID: string): Promise<GuildEmoji>;
|
|
327
392
|
/**
|
|
328
393
|
* Get the emojis in a guild.
|
|
329
394
|
* @param guildID The ID of the guild.
|
|
395
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
396
|
+
* @caches {@link Guild#emojis | Guild#emojis} (will be completely cleared and refilled)
|
|
330
397
|
*/
|
|
331
398
|
getEmojis(guildID: string): Promise<Array<GuildEmoji>>;
|
|
332
399
|
/**
|
|
333
400
|
* Get the integrations in a guild.
|
|
334
401
|
* @param guildID The ID of the guild.
|
|
402
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
403
|
+
* @caches {@link Guild#integrations | Guild#integrations}
|
|
335
404
|
*/
|
|
336
405
|
getIntegrations(guildID: string): Promise<Array<Integration>>;
|
|
337
406
|
/**
|
|
338
407
|
* Get the invites of a guild.
|
|
339
408
|
* @param guildID The ID of the guild to get the invites of.
|
|
409
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
410
|
+
* @caches {@link Guild#invites | Guild#invites}
|
|
340
411
|
*/
|
|
341
412
|
getInvites<CH extends AnyInviteChannel | PartialInviteChannel | Uncached = AnyInviteChannel | PartialInviteChannel | Uncached>(guildID: string): Promise<Array<Invite<"withMetadata", CH>>>;
|
|
342
413
|
/**
|
|
343
414
|
* Get a guild member.
|
|
344
415
|
* @param guildID The ID of the guild.
|
|
345
416
|
* @param memberID The ID of the member.
|
|
417
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
418
|
+
* @caches {@link Guild#members | Guild#members}
|
|
346
419
|
*/
|
|
347
420
|
getMember(guildID: string, memberID: string): Promise<Member>;
|
|
348
421
|
/**
|
|
349
422
|
* Get a guild's members. This requires the `GUILD_MEMBERS` intent.
|
|
350
423
|
* @param guildID The ID of the guild.
|
|
351
424
|
* @param options The options for getting the members.
|
|
425
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
426
|
+
* @caches {@link Guild#members | Guild#members}}
|
|
352
427
|
*/
|
|
353
428
|
getMembers(guildID: string, options?: GetMembersOptions): Promise<Array<Member>>;
|
|
354
429
|
/**
|
|
355
430
|
* Get a guild's onboarding info.
|
|
356
431
|
* @param guildID The ID of the guild.
|
|
432
|
+
* @caching This method **does not** cache its result.
|
|
357
433
|
*/
|
|
358
434
|
getOnboarding(guildID: string): Promise<Onboarding>;
|
|
359
435
|
/**
|
|
360
436
|
* Get a preview of a guild. If the client is not already in this guild, the guild must be lurkable.
|
|
361
437
|
* @param guildID The ID of the guild.
|
|
438
|
+
* @caching This method **does not** cache its result.
|
|
362
439
|
*/
|
|
363
440
|
getPreview(guildID: string): Promise<GuildPreview>;
|
|
364
441
|
/**
|
|
365
442
|
* Get the prune count of a guild.
|
|
366
443
|
* @param guildID The ID of the guild.
|
|
367
444
|
* @param options The options for getting the prune count.
|
|
445
|
+
* @caching This method **does not** cache its result.
|
|
368
446
|
*/
|
|
369
447
|
getPruneCount(guildID: string, options?: GetPruneCountOptions): Promise<number>;
|
|
370
448
|
/**
|
|
371
449
|
* Get the roles in a guild.
|
|
372
450
|
* @param guildID The ID of the guild.
|
|
451
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
452
|
+
* @caches {@link Guild#roles | Guild#roles}
|
|
373
453
|
*/
|
|
374
454
|
getRoles(guildID: string): Promise<Array<Role>>;
|
|
375
455
|
/**
|
|
@@ -377,6 +457,8 @@ export default class Guilds {
|
|
|
377
457
|
* @param guildID The ID of the guild.
|
|
378
458
|
* @param eventID The ID of the scheduled event to get.
|
|
379
459
|
* @param withUserCount If the number of users subscribed to the event should be included.
|
|
460
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
461
|
+
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
|
|
380
462
|
*/
|
|
381
463
|
getScheduledEvent(guildID: string, eventID: string, withUserCount?: number): Promise<GuildScheduledEvent>;
|
|
382
464
|
/**
|
|
@@ -384,69 +466,86 @@ export default class Guilds {
|
|
|
384
466
|
* @param guildID The ID of the guild.
|
|
385
467
|
* @param eventID The ID of the scheduled event.
|
|
386
468
|
* @param options The options for getting the users.
|
|
469
|
+
* @caching This method **does** cache part its result. Members will not be cached if the guild is not cached.
|
|
470
|
+
* @caches {@link Client#users | Client#users}<br>{@link Guild#members | Guild#members}
|
|
387
471
|
*/
|
|
388
472
|
getScheduledEventUsers(guildID: string, eventID: string, options?: GetScheduledEventUsersOptions): Promise<Array<ScheduledEventUser>>;
|
|
389
473
|
/**
|
|
390
474
|
* Get a guild's scheduled events.
|
|
391
475
|
* @param guildID The ID of the guild.
|
|
392
476
|
* @param withUserCount If the number of users subscribed to the event should be included.
|
|
477
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
478
|
+
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
|
|
393
479
|
*/
|
|
394
480
|
getScheduledEvents(guildID: string, withUserCount?: number): Promise<Array<GuildScheduledEvent>>;
|
|
395
481
|
/**
|
|
396
482
|
* Get a sticker. Response will include a user if the client has the `MANAGE_EMOJIS_AND_STICKERS` permissions.
|
|
397
483
|
* @param guildID The ID of the guild.
|
|
398
484
|
* @param stickerID The ID of the sticker to get.
|
|
485
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
486
|
+
* @caches {@link Guild#stickers | Guild#stickers}
|
|
399
487
|
*/
|
|
400
488
|
getSticker(guildID: string, stickerID: string): Promise<Sticker>;
|
|
401
489
|
/**
|
|
402
490
|
* Get a guild's stickers. Stickers will include a user if the client has the `MANAGE_EMOJIS_AND_STICKERS` permissions.
|
|
403
491
|
* @param guildID The ID of the guild.
|
|
492
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
493
|
+
* @caches {@link Guild#stickers | Guild#stickers} (will be completely cleared and refilled)
|
|
404
494
|
*/
|
|
405
495
|
getStickers(guildID: string): Promise<Array<Sticker>>;
|
|
406
496
|
/**
|
|
407
497
|
* Get a guild template.
|
|
408
498
|
* @param code The code of the template to get.
|
|
499
|
+
* @caching This method **does not** cache its result.
|
|
409
500
|
*/
|
|
410
501
|
getTemplate(code: string): Promise<GuildTemplate>;
|
|
411
502
|
/**
|
|
412
503
|
* Get a guild's templates.
|
|
413
504
|
* @param guildID The ID of the guild.
|
|
505
|
+
* @caching This method **does not** cache its result.
|
|
414
506
|
*/
|
|
415
507
|
getTemplates(guildID: string): Promise<Array<GuildTemplate>>;
|
|
416
508
|
/**
|
|
417
509
|
* Get the vanity url of a guild.
|
|
418
510
|
* @param guildID The ID of the guild.
|
|
511
|
+
* @caching This method **does not** cache its result.
|
|
419
512
|
*/
|
|
420
513
|
getVanityURL(guildID: string): Promise<GetVanityURLResponse>;
|
|
421
514
|
/**
|
|
422
515
|
* Get the list of usable voice regions for a guild. This will return VIP servers when the guild is VIP-enabled.
|
|
423
516
|
* @param guildID The ID of the guild.
|
|
517
|
+
* @caching This method **does not** cache its result.
|
|
424
518
|
*/
|
|
425
519
|
getVoiceRegions(guildID: string): Promise<Array<VoiceRegion>>;
|
|
426
520
|
/**
|
|
427
521
|
* Get the welcome screen for a guild.
|
|
428
522
|
* @param guildID The ID of the guild.
|
|
523
|
+
* @caching This method **does not** cache its result.
|
|
429
524
|
*/
|
|
430
525
|
getWelcomeScreen(guildID: string): Promise<WelcomeScreen>;
|
|
431
526
|
/**
|
|
432
527
|
* Get the widget of a guild.
|
|
433
528
|
* @param guildID The ID of the guild.
|
|
529
|
+
* @caching This method **does not** cache its result.
|
|
434
530
|
*/
|
|
435
531
|
getWidget(guildID: string): Promise<Widget>;
|
|
436
532
|
/**
|
|
437
533
|
* Get the widget image of a guild.
|
|
438
534
|
* @param guildID The ID of the guild.
|
|
439
535
|
* @param style The style of the image.
|
|
536
|
+
* @caching This method **does not** cache its result.
|
|
440
537
|
*/
|
|
441
538
|
getWidgetImage(guildID: string, style?: WidgetImageStyle): Promise<Buffer>;
|
|
442
539
|
/**
|
|
443
540
|
* Get the raw JSON widget of a guild.
|
|
444
541
|
* @param guildID The ID of the guild.
|
|
542
|
+
* @caching This method **does not** cache its result.
|
|
445
543
|
*/
|
|
446
544
|
getWidgetJSON(guildID: string): Promise<RawWidget>;
|
|
447
545
|
/**
|
|
448
546
|
* Get a guild's widget settings.
|
|
449
547
|
* @param guildID The ID of the guild.
|
|
548
|
+
* @caching This method **does not** cache its result.
|
|
450
549
|
*/
|
|
451
550
|
getWidgetSettings(guildID: string): Promise<WidgetSettings>;
|
|
452
551
|
/**
|
|
@@ -454,6 +553,7 @@ export default class Guilds {
|
|
|
454
553
|
* @param guildID The ID of the guild.
|
|
455
554
|
* @param userID The ID of the user to remove the ban from.
|
|
456
555
|
* @param reason The reason for removing the ban.
|
|
556
|
+
* @caching This method **does not** cache its result.
|
|
457
557
|
*/
|
|
458
558
|
removeBan(guildID: string, userID: string, reason?: string): Promise<void>;
|
|
459
559
|
/**
|
|
@@ -461,6 +561,7 @@ export default class Guilds {
|
|
|
461
561
|
* @param guildID The ID of the guild.
|
|
462
562
|
* @param memberID The ID of the user to remove.
|
|
463
563
|
* @param reason The reason for the removal.
|
|
564
|
+
* @caching This method **does not** cache its result.
|
|
464
565
|
*/
|
|
465
566
|
removeMember(guildID: string, memberID: string, reason?: string): Promise<void>;
|
|
466
567
|
/**
|
|
@@ -469,18 +570,22 @@ export default class Guilds {
|
|
|
469
570
|
* @param memberID The ID of the member.
|
|
470
571
|
* @param roleID The ID of the role to remove.
|
|
471
572
|
* @param reason The reason for removing the role.
|
|
573
|
+
* @caching This method **does not** cache its result.
|
|
472
574
|
*/
|
|
473
575
|
removeMemberRole(guildID: string, memberID: string, roleID: string, reason?: string): Promise<void>;
|
|
474
576
|
/**
|
|
475
577
|
* Search the username & nicknames of members in a guild.
|
|
476
578
|
* @param guildID The ID of the guild.
|
|
477
579
|
* @param options The options to search with.
|
|
580
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
|
581
|
+
* @caches {@link Guild#members | Guild#members}
|
|
478
582
|
*/
|
|
479
583
|
searchMembers(guildID: string, options: SearchMembersOptions): Promise<Array<Member>>;
|
|
480
584
|
/**
|
|
481
585
|
* Sync a guild template.
|
|
482
586
|
* @param guildID The ID of the guild.
|
|
483
587
|
* @param code The code of the template to sync.
|
|
588
|
+
* @caching This method **does not** cache its result.
|
|
484
589
|
*/
|
|
485
590
|
syncTemplate(guildID: string, code: string): Promise<GuildTemplate>;
|
|
486
591
|
}
|