oceanic.js 1.7.2-dev.d675d64 → 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.
Files changed (75) hide show
  1. package/dist/lib/Client.d.ts +6 -6
  2. package/dist/lib/Client.js +10 -4
  3. package/dist/lib/Constants.d.ts +6 -6
  4. package/dist/lib/Constants.js +7 -7
  5. package/dist/lib/gateway/Shard.d.ts +1 -1
  6. package/dist/lib/gateway/Shard.js +10 -24
  7. package/dist/lib/index.d.ts +1 -0
  8. package/dist/lib/index.js +4 -2
  9. package/dist/lib/rest/RESTManager.d.ts +2 -2
  10. package/dist/lib/rest/RESTManager.js +3 -3
  11. package/dist/lib/routes/ApplicationCommands.d.ts +16 -1
  12. package/dist/lib/routes/ApplicationCommands.js +18 -3
  13. package/dist/lib/routes/Channels.d.ts +73 -3
  14. package/dist/lib/routes/Channels.js +78 -11
  15. package/dist/lib/routes/Guilds.d.ts +115 -10
  16. package/dist/lib/routes/Guilds.js +146 -44
  17. package/dist/lib/routes/Interactions.d.ts +10 -2
  18. package/dist/lib/routes/Interactions.js +10 -2
  19. package/dist/lib/routes/Miscellaneous.d.ts +8 -2
  20. package/dist/lib/routes/Miscellaneous.js +11 -5
  21. package/dist/lib/routes/OAuth.d.ts +17 -4
  22. package/dist/lib/routes/OAuth.js +17 -4
  23. package/dist/lib/routes/Users.d.ts +7 -5
  24. package/dist/lib/routes/Users.js +7 -5
  25. package/dist/lib/routes/Webhooks.d.ts +16 -2
  26. package/dist/lib/routes/Webhooks.js +16 -17
  27. package/dist/lib/structures/AnnouncementChannel.d.ts +4 -1
  28. package/dist/lib/structures/AnnouncementChannel.js +5 -2
  29. package/dist/lib/structures/Application.d.ts +1 -1
  30. package/dist/lib/structures/Application.js +2 -2
  31. package/dist/lib/structures/CategoryChannel.d.ts +1 -1
  32. package/dist/lib/structures/CategoryChannel.js +1 -1
  33. package/dist/lib/structures/CommandInteraction.d.ts +2 -2
  34. package/dist/lib/structures/CommandInteraction.js +2 -2
  35. package/dist/lib/structures/ComponentInteraction.d.ts +2 -2
  36. package/dist/lib/structures/ComponentInteraction.js +2 -2
  37. package/dist/lib/structures/GroupChannel.d.ts +1 -1
  38. package/dist/lib/structures/GroupChannel.js +7 -11
  39. package/dist/lib/structures/Guild.d.ts +17 -17
  40. package/dist/lib/structures/Guild.js +35 -23
  41. package/dist/lib/structures/Member.d.ts +1 -1
  42. package/dist/lib/structures/Member.js +1 -1
  43. package/dist/lib/structures/Message.d.ts +1 -1
  44. package/dist/lib/structures/Message.js +1 -1
  45. package/dist/lib/structures/ModalSubmitInteraction.d.ts +2 -2
  46. package/dist/lib/structures/ModalSubmitInteraction.js +2 -2
  47. package/dist/lib/structures/PrivateChannel.d.ts +1 -1
  48. package/dist/lib/structures/PrivateChannel.js +1 -1
  49. package/dist/lib/structures/TextableChannel.d.ts +2 -2
  50. package/dist/lib/structures/TextableChannel.js +1 -1
  51. package/dist/lib/structures/TextableVoiceChannel.d.ts +1 -1
  52. package/dist/lib/structures/TextableVoiceChannel.js +1 -1
  53. package/dist/lib/structures/ThreadChannel.d.ts +1 -1
  54. package/dist/lib/structures/ThreadChannel.js +1 -1
  55. package/dist/lib/structures/ThreadOnlyChannel.d.ts +3 -3
  56. package/dist/lib/structures/ThreadOnlyChannel.js +5 -4
  57. package/dist/lib/structures/User.js +2 -2
  58. package/dist/lib/types/channels.d.ts +7 -7
  59. package/dist/lib/types/client.d.ts +20 -0
  60. package/dist/lib/types/gateway.d.ts +1 -1
  61. package/dist/lib/types/guilds.d.ts +2 -0
  62. package/dist/lib/types/interactions.d.ts +11 -11
  63. package/dist/lib/types/misc.d.ts +3 -0
  64. package/dist/lib/util/Errors.d.ts +1 -1
  65. package/dist/lib/util/Errors.js +2 -2
  66. package/dist/lib/util/SimpleCollection.d.ts +12 -0
  67. package/dist/lib/util/SimpleCollection.js +81 -0
  68. package/dist/lib/util/TypedCollection.d.ts +13 -5
  69. package/dist/lib/util/TypedCollection.js +19 -6
  70. package/dist/lib/util/Util.d.ts +2 -2
  71. package/dist/lib/util/Util.js +14 -11
  72. package/dist/package.json +12 -6
  73. package/esm.mjs +2 -0
  74. package/package.json +12 -6
  75. package/patches/typedoc-plugin-merge-modules@5.0.1.patch +26 -0
@@ -1,6 +1,6 @@
1
- /** @module Routes/Channels */
1
+ /** @module REST/Channels */
2
2
  import type { AddGroupRecipientOptions, AnyChannel, AnyTextableChannel, ArchivedThreads, CreateInviteOptions, CreateMessageOptions, EditChannelOptions, EditMessageOptions, EditPermissionOptions, FollowedChannel, GetChannelMessagesOptions, GetArchivedThreadsOptions, GetReactionsOptions, AnyInviteChannel, ThreadMember, StartThreadFromMessageOptions, StartThreadInThreadOnlyChannelOptions, StartThreadWithoutMessageOptions, GetInviteWithCountsAndExpirationOptions, GetInviteWithCountsOptions, GetInviteWithExpirationOptions, GetInviteWithNoneOptions, InviteInfoTypes, AnyEditableChannel, PartialInviteChannel, PurgeOptions, AnyTextableGuildChannel, GetThreadMembersOptions, GetChannelMessagesIteratorOptions, MessagesIterator } from "../types/channels";
3
- import Message from "../structures/Message";
3
+ import type Message from "../structures/Message";
4
4
  import type { CreateGroupChannelOptions } from "../types/users";
5
5
  import Invite from "../structures/Invite";
6
6
  import type AnnouncementThreadChannel from "../structures/AnnouncementThreadChannel";
@@ -15,7 +15,7 @@ import type User from "../structures/User";
15
15
  import type { Uncached } from "../types/shared";
16
16
  import type { CreateStageInstanceOptions, EditStageInstanceOptions } from "../types/guilds";
17
17
  import StageInstance from "../structures/StageInstance";
18
- /** Various methods for interacting with channels. */
18
+ /** Various methods for interacting with channels. Located at {@link Client#rest | Client#rest}{@link RESTManager#channels | .channels}. */
19
19
  export default class Channels {
20
20
  #private;
21
21
  constructor(manager: RESTManager);
@@ -23,34 +23,43 @@ export default class Channels {
23
23
  * Add a user to a group channel.
24
24
  * @param groupID The ID of the group to add the user to.
25
25
  * @param options The options for adding the recipient.
26
+ * @caching This method **does not** cache its result.
26
27
  */
27
28
  addGroupRecipient(groupID: string, options: AddGroupRecipientOptions): Promise<void>;
28
29
  /**
29
30
  * Add a member to a thread.
30
31
  * @param channelID The ID of the thread to add them to.
31
32
  * @param userID The ID of the user to add to the thread.
33
+ * @caching This method **does not** cache its result.
32
34
  */
33
35
  addThreadMember(channelID: string, userID: string): Promise<void>;
34
36
  /**
35
37
  * Create a direct message. This will not create a new channel if you have already started a dm with the user.
36
38
  * @param recipient The ID of the recipient of the direct message.
39
+ * @caching This method **does** cache its result.
40
+ * @caches {@link Client#privateChannels | Client#privateChannels}
37
41
  */
38
42
  createDM(recipient: string): Promise<PrivateChannel>;
39
43
  /**
40
44
  * Create a group dm.
41
45
  * @param options The options for creating the group dm.
46
+ * @caching This method **does** cache its result.
47
+ * @caches {@link Client#groupChannels | Client#groupChannels}
42
48
  */
43
49
  createGroupDM(options: CreateGroupChannelOptions): Promise<GroupChannel>;
44
50
  /**
45
51
  * Create an invite for a channel. If the guild is not a `COMMUNITY` server, invites can only be made to last 30 days.
46
52
  * @param channelID The ID of the channel to create an invite for.
47
53
  * @param options The options for creating the invite.
54
+ * @caching This method **does not** cache its result.
48
55
  */
49
56
  createInvite<T extends InviteInfoTypes, CH extends AnyInviteChannel | PartialInviteChannel | Uncached = AnyInviteChannel | PartialInviteChannel | Uncached>(channelID: string, options: CreateInviteOptions): Promise<Invite<T, CH>>;
50
57
  /**
51
58
  * Create a message in a channel.
52
59
  * @param channelID The ID of the channel to create the message in.
53
60
  * @param options The options for creating the message.
61
+ * @caching This method **may** cache its result. The result will not be cached if the channel is not cached.
62
+ * @caches {@link TextableChannel#messages | TextableChannel#messages}<br>{@link ThreadChannel#messages | ThreadChannel#messages}<br>{@link PrivateChannel#messages | PrivateChannel#messages}
54
63
  */
55
64
  createMessage<T extends AnyTextableChannel | Uncached = AnyTextableChannel | Uncached>(channelID: string, options: CreateMessageOptions): Promise<Message<T>>;
56
65
  /**
@@ -58,30 +67,36 @@ export default class Channels {
58
67
  * @param channelID The ID of the channel the message is in.
59
68
  * @param messageID The ID of the message to add a reaction to.
60
69
  * @param emoji The reaction to add to the message. `name:id` for custom emojis, and the unicode codepoint for default emojis.
70
+ * @caching This method **does not** cache its result.
61
71
  */
62
72
  createReaction(channelID: string, messageID: string, emoji: string): Promise<void>;
63
73
  /**
64
74
  * Create a stage instance.
65
75
  * @param channelID The ID of the channel to create the stage instance on.
66
76
  * @param options The options for creating the stage instance.
77
+ * @caching This method **does not** cache its result.
67
78
  */
68
79
  createStageInstance(channelID: string, options: CreateStageInstanceOptions): Promise<StageInstance>;
69
80
  /**
70
81
  * Crosspost a message in an announcement channel.
71
82
  * @param channelID The ID of the channel to crosspost the message in.
72
83
  * @param messageID The ID of the message to crosspost.
84
+ * @caching This method **may** cache its result. The result will not be cached if the channel is not cached.
85
+ * @caches {@link TextableChannel#messages | TextableChannel#messages}<br>{@link ThreadChannel#messages | ThreadChannel#messages}<br>{@link PrivateChannel#messages | PrivateChannel#messages}
73
86
  */
74
87
  crosspostMessage<T extends AnnouncementChannel | Uncached = AnnouncementChannel | Uncached>(channelID: string, messageID: string): Promise<Message<T>>;
75
88
  /**
76
89
  * Delete or close a channel.
77
90
  * @param channelID The ID of the channel to delete or close.
78
91
  * @param reason The reason to be displayed in the audit log.
92
+ * @caching This method **does not** cache its result.
79
93
  */
80
94
  delete(channelID: string, reason?: string): Promise<void>;
81
95
  /**
82
96
  * Delete an invite.
83
97
  * @param code The code of the invite to delete.
84
98
  * @param reason The reason for deleting the invite.
99
+ * @caching This method **does not** cache its result.
85
100
  */
86
101
  deleteInvite<T extends AnyInviteChannel | PartialInviteChannel | Uncached = AnyInviteChannel | PartialInviteChannel | Uncached>(code: string, reason?: string): Promise<Invite<"withMetadata", T>>;
87
102
  /**
@@ -89,6 +104,7 @@ export default class Channels {
89
104
  * @param channelID The ID of the channel to delete the message in.
90
105
  * @param messageID The ID of the message to delete.
91
106
  * @param reason The reason for deleting the message.
107
+ * @caching This method **does not** cache its result.
92
108
  */
93
109
  deleteMessage(channelID: string, messageID: string, reason?: string): Promise<void>;
94
110
  /**
@@ -96,6 +112,7 @@ export default class Channels {
96
112
  * @param channelID The ID of the channel to delete the messages in.
97
113
  * @param messageIDs The IDs of the messages to delete. Any duplicates or messages older than two weeks will cause an error.
98
114
  * @param reason The reason for deleting the messages.
115
+ * @caching This method **does not** cache its result.
99
116
  */
100
117
  deleteMessages(channelID: string, messageIDs: Array<string>, reason?: string): Promise<number>;
101
118
  /**
@@ -103,6 +120,7 @@ export default class Channels {
103
120
  * @param channelID The ID of the channel to delete the permission overwrite in.
104
121
  * @param overwriteID The ID of the permission overwrite to delete.
105
122
  * @param reason The reason for deleting the permission overwrite.
123
+ * @caching This method **does not** cache its result.
106
124
  */
107
125
  deletePermission(channelID: string, overwriteID: string, reason?: string): Promise<void>;
108
126
  /**
@@ -111,6 +129,7 @@ export default class Channels {
111
129
  * @param messageID The ID of the message to remove a reaction from.
112
130
  * @param emoji The reaction to remove from the message. `name:id` for custom emojis, and the unicode codepoint for default emojis.
113
131
  * @param user The user to remove the reaction from, `@me` for the current user (default).
132
+ * @caching This method **does not** cache its result.
114
133
  */
115
134
  deleteReaction(channelID: string, messageID: string, emoji: string, user?: string): Promise<void>;
116
135
  /**
@@ -118,18 +137,22 @@ export default class Channels {
118
137
  * @param channelID The ID of the channel the message is in.
119
138
  * @param messageID The ID of the message to remove reactions from.
120
139
  * @param emoji The reaction to remove from the message. `name:id` for custom emojis, and the unicode codepoint for default emojis. Omit to remove all reactions.
140
+ * @caching This method **does not** cache its result.
121
141
  */
122
142
  deleteReactions(channelID: string, messageID: string, emoji?: string): Promise<void>;
123
143
  /**
124
144
  * Delete a stage instance.
125
145
  * @param channelID The ID of the channel to delete the stage instance on.
126
146
  * @param reason The reason for deleting the stage instance.
147
+ * @caching This method **does not** cache its result.
127
148
  */
128
149
  deleteStageInstance(channelID: string, reason?: string): Promise<void>;
129
150
  /**
130
151
  * Edit a channel.
131
152
  * @param channelID The ID of the channel to edit.
132
153
  * @param options The options for editing the channel.
154
+ * @caching This method **may** cache its result. If a guild channel, the result will not be cached if the guild is not cached.
155
+ * @caches {@link Guild#channels | Guild#channels}<br>{@link Guild#threads | Guild#threads}<br>{@link Client#groupChannels | Client#groupChannels}
133
156
  */
134
157
  edit<T extends AnyEditableChannel = AnyEditableChannel>(channelID: string, options: EditChannelOptions): Promise<T>;
135
158
  /**
@@ -137,6 +160,8 @@ export default class Channels {
137
160
  * @param channelID The ID of the channel the message is in.
138
161
  * @param messageID The ID of the message to edit.
139
162
  * @param options The options for editing the message.
163
+ * @caching This method **may** cache its result. The result will not be cached if the channel is not cached.
164
+ * @caches {@link TextableChannel#messages | TextableChannel#messages}<br>{@link ThreadChannel#messages | ThreadChannel#messages}<br>{@link PrivateChannel#messages | PrivateChannel#messages}
140
165
  */
141
166
  editMessage<T extends AnyTextableChannel | Uncached = AnyTextableChannel | Uncached>(channelID: string, messageID: string, options: EditMessageOptions): Promise<Message<T>>;
142
167
  /**
@@ -144,29 +169,35 @@ export default class Channels {
144
169
  * @param channelID The ID of the channel to edit the permission overwrite for.
145
170
  * @param overwriteID The ID of the permission overwrite to edit.
146
171
  * @param options The options for editing the permission overwrite.
172
+ * @caching This method **does not** cache its result.
147
173
  */
148
174
  editPermission(channelID: string, overwriteID: string, options: EditPermissionOptions): Promise<void>;
149
175
  /**
150
176
  * Edit a stage instance.
151
177
  * @param channelID The ID of the channel to edit the stage instance on.
152
178
  * @param options The options for editing the stage instance.
179
+ * @caching This method **does not** cache its result.
153
180
  */
154
181
  editStageInstance(channelID: string, options: EditStageInstanceOptions): Promise<StageInstance>;
155
182
  /**
156
183
  * Follow an announcement channel.
157
184
  * @param channelID The ID of the channel to follow announcements from.
158
185
  * @param webhookChannelID The ID of the channel crossposted messages should be sent to. The client must have the `MANAGE_WEBHOOKS` permission in this channel.
186
+ * @caching This method **does not** cache its result.
159
187
  */
160
188
  followAnnouncement(channelID: string, webhookChannelID: string): Promise<FollowedChannel>;
161
189
  /**
162
190
  * Get a channel.
163
191
  * @param channelID The ID of the channel to get.
192
+ * @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
193
+ * @caches {@link Guild#channels | Guild#channels}<br>{@link Guild#threads | Guild#threads}<br>{@link Client#privateChannels | Client#privateChannels}<br>{@link Client#groupChannels | Client#groupChannels}
164
194
  */
165
195
  get<T extends AnyChannel = AnyChannel>(channelID: string): Promise<T>;
166
196
  /**
167
197
  * Get an invite.
168
198
  * @param code The code of the invite to get.
169
199
  * @param options The options for getting the invite.
200
+ * @caching This method **does not** cache its result.
170
201
  */
171
202
  getInvite<T extends AnyInviteChannel | PartialInviteChannel | Uncached = AnyInviteChannel | PartialInviteChannel | Uncached>(code: string, options: GetInviteWithNoneOptions): Promise<Invite<"withMetadata", T>>;
172
203
  getInvite<T extends AnyInviteChannel | PartialInviteChannel | Uncached = AnyInviteChannel | PartialInviteChannel | Uncached>(code: string, options: GetInviteWithCountsAndExpirationOptions): Promise<Invite<"withMetadata" | "withCounts" | "withExpiration", T>>;
@@ -175,48 +206,69 @@ export default class Channels {
175
206
  /**
176
207
  * Get the invites of a channel.
177
208
  * @param channelID The ID of the channel to get the invites of.
209
+ * @caching This method **does not** cache its result.
178
210
  */
179
211
  getInvites<T extends AnyInviteChannel | PartialInviteChannel | Uncached = AnyInviteChannel | PartialInviteChannel | Uncached>(channelID: string): Promise<Array<Invite<"withMetadata", T>>>;
180
212
  /**
181
213
  * Get the private archived threads the current user has joined in a channel.
182
214
  * @param channelID The ID of the channel to get the archived threads from.
183
215
  * @param options The options for getting the archived threads.
216
+ * @caching This method **does not** cache its result.
184
217
  */
185
218
  getJoinedPrivateArchivedThreads(channelID: string, options?: GetArchivedThreadsOptions): Promise<ArchivedThreads<PrivateThreadChannel>>;
186
219
  /**
187
220
  * Get a message in a channel.
188
221
  * @param channelID The ID of the channel the message is in
189
222
  * @param messageID The ID of the message to get.
223
+ * @caching This method **may** cache its result. The result will not be cached if the channel is not cached.
224
+ * @caches {@link TextableChannel#messages | TextableChannel#messages}<br>{@link ThreadChannel#messages | ThreadChannel#messages}<br>{@link PrivateChannel#messages | PrivateChannel#messages}
190
225
  */
191
226
  getMessage<T extends AnyTextableChannel | Uncached = AnyTextableChannel | Uncached>(channelID: string, messageID: string): Promise<Message<T>>;
192
227
  /**
193
228
  * Get messages in a channel.
194
229
  * @param channelID The ID of the channel to get messages from.
195
230
  * @param options The options for getting messages. `before`, `after`, and `around `All are mutually exclusive.
231
+ * @caching This method **may** cache its result. The result will not be cached if the channel is not cached.
232
+ * @caches {@link TextableChannel#messages | TextableChannel#messages}<br>{@link ThreadChannel#messages | ThreadChannel#messages}<br>{@link PrivateChannel#messages | PrivateChannel#messages}
196
233
  */
197
234
  getMessages<T extends AnyTextableChannel | Uncached = AnyTextableChannel | Uncached>(channelID: string, options?: GetChannelMessagesOptions<T>): Promise<Array<Message<T>>>;
198
235
  /**
199
236
  * Get an async iterator for getting messages in a channel.
200
237
  * @param channelID The ID of the channel to get messages from.
201
238
  * @param options The options for getting messages. `before`, `after`, and `around `All are mutually exclusive.
239
+ * @caching This method **may** cache its result. The result will not be cached if the channel is not cached.
240
+ * @caches {@link TextableChannel#messages | TextableChannel#messages}<br>{@link ThreadChannel#messages | ThreadChannel#messages}<br>{@link PrivateChannel#messages | PrivateChannel#messages}
202
241
  */
203
242
  getMessagesIterator<T extends AnyTextableChannel | Uncached = AnyTextableChannel | Uncached>(channelID: string, options?: GetChannelMessagesIteratorOptions<T>): Promise<MessagesIterator<T>>;
204
243
  /**
205
244
  * Get the pinned messages in a channel.
206
245
  * @param channelID The ID of the channel to get the pinned messages from.
246
+ * @caching This method **may** cache its result. The result will not be cached if the channel is not cached.
247
+ * @caches {@link TextableChannel#messages | TextableChannel#messages}<br>{@link ThreadChannel#messages | ThreadChannel#messages}<br>{@link PrivateChannel#messages | PrivateChannel#messages}
207
248
  */
208
249
  getPinnedMessages<T extends AnyTextableChannel | Uncached = AnyTextableChannel | Uncached>(channelID: string): Promise<Array<Message<T>>>;
209
250
  /**
210
251
  * Get the private archived threads in a channel.
211
252
  * @param channelID The ID of the channel to get the archived threads from.
212
253
  * @param options The options for getting the archived threads.
254
+ * @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
255
+ * @caches {@link Guild#threads | Guild#threads}
213
256
  */
214
257
  getPrivateArchivedThreads(channelID: string, options?: GetArchivedThreadsOptions): Promise<ArchivedThreads<PrivateThreadChannel>>;
258
+ /**
259
+ * Get the private joined archived threads in a channel.
260
+ * @param channelID The ID of the channel to get the archived threads from.
261
+ * @param options The options for getting the archived threads.
262
+ * @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
263
+ * @caches {@link Guild#threads | Guild#threads}
264
+ */
215
265
  getPrivateJoinedArchivedThreads(channelID: string, options?: GetArchivedThreadsOptions): Promise<ArchivedThreads<PrivateThreadChannel>>;
216
266
  /**
217
267
  * Get the public archived threads in a channel.
218
268
  * @param channelID The ID of the channel to get the archived threads from.
219
269
  * @param options The options for getting the archived threads.
270
+ * @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
271
+ * @caches {@link Guild#threads | Guild#threads}
220
272
  */
221
273
  getPublicArchivedThreads<T extends AnnouncementThreadChannel | PublicThreadChannel = AnnouncementThreadChannel | PublicThreadChannel>(channelID: string, options?: GetArchivedThreadsOptions): Promise<ArchivedThreads<T>>;
222
274
  /**
@@ -225,23 +277,27 @@ export default class Channels {
225
277
  * @param messageID The ID of the message to get reactions from.
226
278
  * @param emoji The reaction to remove from the message. `name:id` for custom emojis, and the unicode codepoint for default emojis.
227
279
  * @param options The options for getting the reactions.
280
+ * @caching This method **does not** cache its result.
228
281
  */
229
282
  getReactions(channelID: string, messageID: string, emoji: string, options?: GetReactionsOptions): Promise<Array<User>>;
230
283
  /**
231
284
  * Get the stage instance associated with a channel.
232
285
  * @param channelID The ID of the channel to get the stage instance on.
286
+ * @caching This method **does not** cache its result.
233
287
  */
234
288
  getStageInstance(channelID: string): Promise<StageInstance>;
235
289
  /**
236
290
  * Get a thread member.
237
291
  * @param channelID The ID of the thread.
238
292
  * @param userID The ID of the user to get the thread member of.
293
+ * @caching This method **does not** cache its result.
239
294
  */
240
295
  getThreadMember(channelID: string, userID: string): Promise<ThreadMember>;
241
296
  /**
242
297
  * Get the members of a thread.
243
298
  * @param channelID The ID of the thread.
244
299
  * @param options The options for getting the thread members.
300
+ * @caching This method **does not** cache its result.
245
301
  */
246
302
  getThreadMembers(channelID: string, options?: GetThreadMembersOptions): Promise<Array<ThreadMember>>;
247
303
  /** @deprecated Get the list of usable voice regions. Moved to `misc`. */
@@ -249,11 +305,13 @@ export default class Channels {
249
305
  /**
250
306
  * Join a thread.
251
307
  * @param channelID The ID of the thread to join.
308
+ * @caching This method **does not** cache its result.
252
309
  */
253
310
  joinThread(channelID: string): Promise<void>;
254
311
  /**
255
312
  * Leave a thread.
256
313
  * @param channelID The ID of the thread to leave.
314
+ * @caching This method **does not** cache its result.
257
315
  */
258
316
  leaveThread(channelID: string): Promise<void>;
259
317
  /**
@@ -261,29 +319,34 @@ export default class Channels {
261
319
  * @param channelID The ID of the channel to pin the message in.
262
320
  * @param messageID The ID of the message to pin.
263
321
  * @param reason The reason for pinning the message.
322
+ * @caching This method **does not** cache its result.
264
323
  */
265
324
  pinMessage(channelID: string, messageID: string, reason?: string): Promise<void>;
266
325
  /**
267
326
  * Purge an amount of messages from a channel.
268
327
  * @param channelID The ID of the channel to purge.
269
328
  * @param options The options to purge. `before`, `after`, and `around `All are mutually exclusive.
329
+ * @caching This method **does not** cache its result.
270
330
  */
271
331
  purgeMessages<T extends AnyTextableGuildChannel | Uncached = AnyTextableGuildChannel | Uncached>(channelID: string, options: PurgeOptions<T>): Promise<number>;
272
332
  /**
273
333
  * Remove a user from the group channel.
274
334
  * @param groupID The ID of the group to remove the user from.
275
335
  * @param userID The ID of the user to remove.
336
+ * @caching This method **does not** cache its result.
276
337
  */
277
338
  removeGroupRecipient(groupID: string, userID: string): Promise<void>;
278
339
  /**
279
340
  * Remove a member from a thread.
280
341
  * @param channelID The ID of the thread to remove them from.
281
342
  * @param userID The ID of the user to remove from the thread.
343
+ * @caching This method **does not** cache its result.
282
344
  */
283
345
  removeThreadMember(channelID: string, userID: string): Promise<void>;
284
346
  /**
285
347
  * Show a typing indicator in a channel. How long users see this varies from client to client.
286
348
  * @param channelID The ID of the channel to show the typing indicator in.
349
+ * @caching This method **does not** cache its result.
287
350
  */
288
351
  sendTyping(channelID: string): Promise<void>;
289
352
  /**
@@ -291,18 +354,24 @@ export default class Channels {
291
354
  * @param channelID The ID of the channel to create the thread in.
292
355
  * @param messageID The ID of the message to create the thread from.
293
356
  * @param options The options for starting the thread.
357
+ * @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
358
+ * @caches {@link Guild#threads | Guild#threads}
294
359
  */
295
360
  startThreadFromMessage<T extends AnnouncementThreadChannel | PublicThreadChannel = AnnouncementThreadChannel | PublicThreadChannel>(channelID: string, messageID: string, options: StartThreadFromMessageOptions): Promise<T>;
296
361
  /**
297
362
  * Create a thread in a thread only channel (forum & media).
298
363
  * @param channelID The ID of the channel to start the thread in.
299
364
  * @param options The options for starting the thread.
365
+ * @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
366
+ * @caches {@link Guild#threads | Guild#threads}
300
367
  */
301
368
  startThreadInThreadOnlyChannl(channelID: string, options: StartThreadInThreadOnlyChannelOptions): Promise<PublicThreadChannel>;
302
369
  /**
303
370
  * Create a thread without an existing message.
304
371
  * @param channelID The ID of the channel to start the thread in.
305
372
  * @param options The options for starting the thread.
373
+ * @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
374
+ * @caches {@link Guild#threads | Guild#threads}
306
375
  */
307
376
  startThreadWithoutMessage<T extends AnnouncementThreadChannel | PublicThreadChannel | PrivateThreadChannel = AnnouncementThreadChannel | PublicThreadChannel | PrivateThreadChannel>(channelID: string, options: StartThreadWithoutMessageOptions): Promise<T>;
308
377
  /**
@@ -310,6 +379,7 @@ export default class Channels {
310
379
  * @param channelID The ID of the channel to unpin the message in.
311
380
  * @param messageID The ID of the message to unpin.
312
381
  * @param reason The reason for unpinning the message.
382
+ * @caching This method **does not** cache its result.
313
383
  */
314
384
  unpinMessage(channelID: string, messageID: string, reason?: string): Promise<void>;
315
385
  }