oceanic.js 1.10.3-dev.c6c9f52 → 1.10.3-dev.ca8b6e8

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 (205) hide show
  1. package/dist/lib/Client.d.ts +99 -0
  2. package/dist/lib/Client.js +263 -0
  3. package/dist/lib/Constants.d.ts +1215 -0
  4. package/dist/lib/Constants.js +1513 -0
  5. package/dist/lib/gateway/Shard.d.ts +83 -0
  6. package/dist/lib/gateway/Shard.js +1621 -0
  7. package/dist/lib/gateway/ShardManager.d.ts +29 -0
  8. package/dist/lib/gateway/ShardManager.js +300 -0
  9. package/dist/lib/index.d.ts +84 -0
  10. package/dist/lib/index.js +168 -0
  11. package/dist/lib/rest/Bucket.d.ts +33 -0
  12. package/dist/lib/rest/Bucket.js +78 -0
  13. package/dist/lib/rest/DiscordHTTPError.d.ts +16 -0
  14. package/dist/lib/rest/DiscordHTTPError.js +65 -0
  15. package/dist/lib/rest/DiscordRESTError.d.ts +19 -0
  16. package/dist/lib/rest/DiscordRESTError.js +89 -0
  17. package/dist/lib/rest/OAuthHelper.d.ts +62 -0
  18. package/dist/lib/rest/OAuthHelper.js +183 -0
  19. package/dist/lib/rest/RESTManager.d.ts +42 -0
  20. package/dist/lib/rest/RESTManager.js +82 -0
  21. package/dist/lib/rest/RequestHandler.d.ts +28 -0
  22. package/dist/lib/rest/RequestHandler.js +313 -0
  23. package/dist/lib/rest/SequentialBucket.d.ts +25 -0
  24. package/dist/lib/rest/SequentialBucket.js +76 -0
  25. package/dist/lib/routes/Applications.d.ts +171 -0
  26. package/dist/lib/routes/Applications.js +447 -0
  27. package/dist/lib/routes/Channels.d.ts +408 -0
  28. package/dist/lib/routes/Channels.js +1160 -0
  29. package/dist/lib/routes/Guilds.d.ts +606 -0
  30. package/dist/lib/routes/Guilds.js +1669 -0
  31. package/dist/lib/routes/Interactions.d.ts +74 -0
  32. package/dist/lib/routes/Interactions.js +141 -0
  33. package/dist/lib/routes/Miscellaneous.d.ts +31 -0
  34. package/dist/lib/routes/Miscellaneous.js +69 -0
  35. package/dist/lib/routes/OAuth.d.ts +108 -0
  36. package/dist/lib/routes/OAuth.js +312 -0
  37. package/dist/lib/routes/Users.d.ts +32 -0
  38. package/dist/lib/routes/Users.js +59 -0
  39. package/dist/lib/routes/Webhooks.d.ts +128 -0
  40. package/dist/lib/routes/Webhooks.js +265 -0
  41. package/dist/lib/structures/AnnouncementChannel.d.ts +36 -0
  42. package/dist/lib/structures/AnnouncementChannel.js +47 -0
  43. package/dist/lib/structures/AnnouncementThreadChannel.d.ts +18 -0
  44. package/dist/lib/structures/AnnouncementThreadChannel.js +27 -0
  45. package/dist/lib/structures/Application.d.ts +102 -0
  46. package/dist/lib/structures/Application.js +189 -0
  47. package/dist/lib/structures/ApplicationCommand.d.ts +74 -0
  48. package/dist/lib/structures/ApplicationCommand.js +141 -0
  49. package/dist/lib/structures/Attachment.d.ts +34 -0
  50. package/dist/lib/structures/Attachment.js +64 -0
  51. package/dist/lib/structures/AuditLogEntry.d.ts +25 -0
  52. package/dist/lib/structures/AuditLogEntry.js +53 -0
  53. package/dist/lib/structures/AutoModerationRule.d.ts +49 -0
  54. package/dist/lib/structures/AutoModerationRule.js +139 -0
  55. package/dist/lib/structures/AutocompleteInteraction.d.ts +62 -0
  56. package/dist/lib/structures/AutocompleteInteraction.js +115 -0
  57. package/dist/lib/structures/Base.d.ts +20 -0
  58. package/dist/lib/structures/Base.js +58 -0
  59. package/dist/lib/structures/BaseEntitlement.d.ts +19 -0
  60. package/dist/lib/structures/BaseEntitlement.js +44 -0
  61. package/dist/lib/structures/CategoryChannel.d.ts +41 -0
  62. package/dist/lib/structures/CategoryChannel.js +105 -0
  63. package/dist/lib/structures/Channel.d.ts +20 -0
  64. package/dist/lib/structures/Channel.js +91 -0
  65. package/dist/lib/structures/ClientApplication.d.ts +153 -0
  66. package/dist/lib/structures/ClientApplication.js +220 -0
  67. package/dist/lib/structures/CommandInteraction.d.ts +127 -0
  68. package/dist/lib/structures/CommandInteraction.js +297 -0
  69. package/dist/lib/structures/ComponentInteraction.d.ts +137 -0
  70. package/dist/lib/structures/ComponentInteraction.js +311 -0
  71. package/dist/lib/structures/Entitlement.d.ts +12 -0
  72. package/dist/lib/structures/Entitlement.js +26 -0
  73. package/dist/lib/structures/ExtendedUser.d.ts +26 -0
  74. package/dist/lib/structures/ExtendedUser.js +57 -0
  75. package/dist/lib/structures/ForumChannel.d.ts +11 -0
  76. package/dist/lib/structures/ForumChannel.js +19 -0
  77. package/dist/lib/structures/GroupChannel.d.ts +62 -0
  78. package/dist/lib/structures/GroupChannel.js +133 -0
  79. package/dist/lib/structures/Guild.d.ts +654 -0
  80. package/dist/lib/structures/Guild.js +1319 -0
  81. package/dist/lib/structures/GuildChannel.d.ts +34 -0
  82. package/dist/lib/structures/GuildChannel.js +75 -0
  83. package/dist/lib/structures/GuildPreview.d.ts +50 -0
  84. package/dist/lib/structures/GuildPreview.js +119 -0
  85. package/dist/lib/structures/GuildScheduledEvent.d.ts +60 -0
  86. package/dist/lib/structures/GuildScheduledEvent.js +154 -0
  87. package/dist/lib/structures/GuildTemplate.d.ts +55 -0
  88. package/dist/lib/structures/GuildTemplate.js +126 -0
  89. package/dist/lib/structures/Integration.d.ts +54 -0
  90. package/dist/lib/structures/Integration.js +156 -0
  91. package/dist/lib/structures/Interaction.d.ts +40 -0
  92. package/dist/lib/structures/Interaction.js +90 -0
  93. package/dist/lib/structures/InteractionResolvedChannel.d.ts +28 -0
  94. package/dist/lib/structures/InteractionResolvedChannel.js +45 -0
  95. package/dist/lib/structures/Invite.d.ts +64 -0
  96. package/dist/lib/structures/Invite.js +193 -0
  97. package/dist/lib/structures/InviteGuild.d.ts +52 -0
  98. package/dist/lib/structures/InviteGuild.js +88 -0
  99. package/dist/lib/structures/MediaChannel.d.ts +11 -0
  100. package/dist/lib/structures/MediaChannel.js +19 -0
  101. package/dist/lib/structures/Member.d.ts +122 -0
  102. package/dist/lib/structures/Member.js +255 -0
  103. package/dist/lib/structures/Message.d.ts +194 -0
  104. package/dist/lib/structures/Message.js +477 -0
  105. package/dist/lib/structures/ModalSubmitInteraction.d.ts +128 -0
  106. package/dist/lib/structures/ModalSubmitInteraction.js +240 -0
  107. package/dist/lib/structures/OAuthApplication.d.ts +79 -0
  108. package/dist/lib/structures/OAuthApplication.js +210 -0
  109. package/dist/lib/structures/OAuthGuild.d.ts +35 -0
  110. package/dist/lib/structures/OAuthGuild.js +61 -0
  111. package/dist/lib/structures/PartialApplication.d.ts +30 -0
  112. package/dist/lib/structures/PartialApplication.js +67 -0
  113. package/dist/lib/structures/Permission.d.ts +21 -0
  114. package/dist/lib/structures/Permission.js +68 -0
  115. package/dist/lib/structures/PermissionOverwrite.d.ts +26 -0
  116. package/dist/lib/structures/PermissionOverwrite.js +49 -0
  117. package/dist/lib/structures/PingInteraction.d.ts +16 -0
  118. package/dist/lib/structures/PingInteraction.js +26 -0
  119. package/dist/lib/structures/Poll.d.ts +28 -0
  120. package/dist/lib/structures/Poll.js +78 -0
  121. package/dist/lib/structures/PrivateChannel.d.ts +90 -0
  122. package/dist/lib/structures/PrivateChannel.js +131 -0
  123. package/dist/lib/structures/PrivateThreadChannel.d.ts +18 -0
  124. package/dist/lib/structures/PrivateThreadChannel.js +27 -0
  125. package/dist/lib/structures/PublicThreadChannel.d.ts +21 -0
  126. package/dist/lib/structures/PublicThreadChannel.js +37 -0
  127. package/dist/lib/structures/Role.d.ts +52 -0
  128. package/dist/lib/structures/Role.js +137 -0
  129. package/dist/lib/structures/SKU.d.ts +32 -0
  130. package/dist/lib/structures/SKU.js +53 -0
  131. package/dist/lib/structures/StageChannel.d.ts +33 -0
  132. package/dist/lib/structures/StageChannel.js +44 -0
  133. package/dist/lib/structures/StageInstance.d.ts +36 -0
  134. package/dist/lib/structures/StageInstance.js +94 -0
  135. package/dist/lib/structures/Team.d.ts +22 -0
  136. package/dist/lib/structures/Team.js +67 -0
  137. package/dist/lib/structures/TestEntitlement.d.ts +10 -0
  138. package/dist/lib/structures/TestEntitlement.js +21 -0
  139. package/dist/lib/structures/TextChannel.d.ts +34 -0
  140. package/dist/lib/structures/TextChannel.js +46 -0
  141. package/dist/lib/structures/TextableChannel.d.ts +158 -0
  142. package/dist/lib/structures/TextableChannel.js +276 -0
  143. package/dist/lib/structures/TextableVoiceChannel.d.ts +39 -0
  144. package/dist/lib/structures/TextableVoiceChannel.js +81 -0
  145. package/dist/lib/structures/ThreadChannel.d.ts +159 -0
  146. package/dist/lib/structures/ThreadChannel.js +295 -0
  147. package/dist/lib/structures/ThreadOnlyChannel.d.ts +99 -0
  148. package/dist/lib/structures/ThreadOnlyChannel.js +233 -0
  149. package/dist/lib/structures/ThreadableChannel.d.ts +36 -0
  150. package/dist/lib/structures/ThreadableChannel.js +58 -0
  151. package/dist/lib/structures/UnavailableGuild.d.ts +11 -0
  152. package/dist/lib/structures/UnavailableGuild.js +21 -0
  153. package/dist/lib/structures/User.d.ts +82 -0
  154. package/dist/lib/structures/User.js +168 -0
  155. package/dist/lib/structures/VoiceChannel.d.ts +20 -0
  156. package/dist/lib/structures/VoiceChannel.js +35 -0
  157. package/dist/lib/structures/VoiceState.d.ts +51 -0
  158. package/dist/lib/structures/VoiceState.js +140 -0
  159. package/dist/lib/structures/Webhook.d.ts +129 -0
  160. package/dist/lib/structures/Webhook.js +206 -0
  161. package/dist/lib/types/applications.d.ts +466 -0
  162. package/dist/lib/types/audit-log.d.ts +122 -0
  163. package/dist/lib/types/auto-moderation.d.ts +99 -0
  164. package/dist/lib/types/channels.d.ts +1244 -0
  165. package/dist/lib/types/client.d.ts +228 -0
  166. package/dist/lib/types/events.d.ts +265 -0
  167. package/dist/lib/types/gateway-raw.d.ts +584 -0
  168. package/dist/lib/types/gateway.d.ts +351 -0
  169. package/dist/lib/types/guild-template.d.ts +33 -0
  170. package/dist/lib/types/guilds.d.ts +855 -0
  171. package/dist/lib/types/index.d.ts +18 -0
  172. package/dist/lib/types/interactions.d.ts +377 -0
  173. package/dist/lib/types/json.d.ts +742 -0
  174. package/dist/lib/types/misc.d.ts +28 -0
  175. package/dist/lib/types/oauth.d.ts +201 -0
  176. package/dist/lib/types/request-handler.d.ts +52 -0
  177. package/dist/lib/types/scheduled-events.d.ts +88 -0
  178. package/dist/lib/types/shared.d.ts +9 -0
  179. package/dist/lib/types/users.d.ts +45 -0
  180. package/dist/lib/types/voice.d.ts +45 -0
  181. package/dist/lib/types/webhooks.d.ts +74 -0
  182. package/dist/lib/util/Collection.d.ts +47 -0
  183. package/dist/lib/util/Collection.js +78 -0
  184. package/dist/lib/util/Errors.d.ts +29 -0
  185. package/dist/lib/util/Errors.js +56 -0
  186. package/dist/lib/util/Routes.d.ts +127 -0
  187. package/dist/lib/util/Routes.js +248 -0
  188. package/dist/lib/util/SimpleCollection.d.ts +12 -0
  189. package/dist/lib/util/SimpleCollection.js +81 -0
  190. package/dist/lib/util/TypedCollection.d.ts +24 -0
  191. package/dist/lib/util/TypedCollection.js +76 -0
  192. package/dist/lib/util/TypedEmitter.d.ts +19 -0
  193. package/dist/lib/util/TypedEmitter.js +19 -0
  194. package/dist/lib/util/Util.d.ts +58 -0
  195. package/dist/lib/util/Util.js +535 -0
  196. package/dist/lib/util/interactions/InteractionOptionsWrapper.d.ts +170 -0
  197. package/dist/lib/util/interactions/InteractionOptionsWrapper.js +213 -0
  198. package/dist/lib/util/interactions/MessageInteractionResponse.d.ts +24 -0
  199. package/dist/lib/util/interactions/MessageInteractionResponse.js +28 -0
  200. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.d.ts +24 -0
  201. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.js +34 -0
  202. package/dist/lib/util/interactions/SelectMenuValuesWrapper.d.ts +60 -0
  203. package/dist/lib/util/interactions/SelectMenuValuesWrapper.js +124 -0
  204. package/dist/package.json +1 -1
  205. package/package.json +1 -1
@@ -0,0 +1,606 @@
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 _manager;
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
+ }