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