seyfert 1.1.0 → 1.2.0

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 (171) hide show
  1. package/lib/api/Routes/applications.d.ts +2 -2
  2. package/lib/api/Routes/channels.d.ts +2 -2
  3. package/lib/api/Routes/gateway.d.ts +2 -2
  4. package/lib/api/Routes/guilds.d.ts +2 -1
  5. package/lib/api/Routes/interactions.d.ts +2 -2
  6. package/lib/api/Routes/invites.d.ts +2 -2
  7. package/lib/api/Routes/stage-instances.d.ts +2 -2
  8. package/lib/api/Routes/stickers.d.ts +2 -2
  9. package/lib/api/Routes/users.d.ts +2 -2
  10. package/lib/api/Routes/voice.d.ts +2 -2
  11. package/lib/api/Routes/webhooks.d.ts +2 -2
  12. package/lib/builders/ActionRow.d.ts +2 -1
  13. package/lib/builders/ActionRow.js +3 -3
  14. package/lib/builders/Base.d.ts +1 -1
  15. package/lib/builders/Button.d.ts +2 -1
  16. package/lib/builders/Button.js +2 -2
  17. package/lib/builders/Embed.d.ts +2 -1
  18. package/lib/builders/Modal.d.ts +9 -2
  19. package/lib/builders/Modal.js +12 -3
  20. package/lib/builders/SelectMenu.d.ts +18 -1
  21. package/lib/builders/SelectMenu.js +36 -12
  22. package/lib/builders/index.d.ts +1 -1
  23. package/lib/builders/index.js +9 -9
  24. package/lib/builders/types.d.ts +1 -1
  25. package/lib/cache/adapters/types.d.ts +23 -23
  26. package/lib/cache/index.d.ts +5 -5
  27. package/lib/cache/index.js +3 -3
  28. package/lib/cache/resources/default/base.d.ts +10 -10
  29. package/lib/cache/resources/default/guild-based.d.ts +7 -7
  30. package/lib/cache/resources/default/guild-based.js +2 -1
  31. package/lib/cache/resources/default/guild-related.d.ts +9 -9
  32. package/lib/cache/resources/default/guild-related.js +2 -1
  33. package/lib/cache/resources/presence.d.ts +1 -1
  34. package/lib/cache/resources/stage-instances.d.ts +1 -1
  35. package/lib/cache/resources/voice-states.d.ts +1 -1
  36. package/lib/client/base.d.ts +19 -12
  37. package/lib/client/base.js +45 -7
  38. package/lib/client/client.d.ts +7 -4
  39. package/lib/client/client.js +21 -9
  40. package/lib/client/httpclient.d.ts +2 -1
  41. package/lib/client/httpclient.js +3 -3
  42. package/lib/client/oninteractioncreate.js +18 -19
  43. package/lib/client/onmessagecreate.js +6 -4
  44. package/lib/client/workerclient.d.ts +11 -5
  45. package/lib/client/workerclient.js +18 -11
  46. package/lib/commands/applications/chat.d.ts +4 -4
  47. package/lib/commands/applications/chat.js +17 -9
  48. package/lib/commands/applications/chatcontext.d.ts +7 -10
  49. package/lib/commands/applications/chatcontext.js +6 -17
  50. package/lib/commands/applications/menu.d.ts +2 -1
  51. package/lib/commands/applications/menu.js +7 -5
  52. package/lib/commands/applications/menucontext.d.ts +5 -9
  53. package/lib/commands/applications/menucontext.js +8 -21
  54. package/lib/commands/applications/shared.d.ts +5 -4
  55. package/lib/commands/basecontex.d.ts +15 -0
  56. package/lib/commands/basecontex.js +34 -0
  57. package/lib/commands/decorators.d.ts +3 -2
  58. package/lib/commands/decorators.js +5 -5
  59. package/lib/commands/handler.d.ts +6 -0
  60. package/lib/commands/handler.js +10 -4
  61. package/lib/commands/optionresolver.d.ts +3 -3
  62. package/lib/commands/optionresolver.js +14 -14
  63. package/lib/common/index.d.ts +0 -1
  64. package/lib/common/index.js +0 -1
  65. package/lib/common/it/constants.d.ts +3 -1
  66. package/lib/common/it/constants.js +2 -0
  67. package/lib/common/it/utils.d.ts +1 -0
  68. package/lib/common/it/utils.js +2 -1
  69. package/lib/common/shorters/channels.d.ts +1 -1
  70. package/lib/common/shorters/channels.js +4 -4
  71. package/lib/common/shorters/guilds.d.ts +1 -1
  72. package/lib/common/shorters/guilds.js +6 -1
  73. package/lib/common/shorters/members.d.ts +6 -1
  74. package/lib/common/shorters/members.js +25 -2
  75. package/lib/common/shorters/messages.d.ts +1 -1
  76. package/lib/common/shorters/messages.js +1 -1
  77. package/lib/common/shorters/users.d.ts +0 -6
  78. package/lib/common/shorters/users.js +0 -34
  79. package/lib/common/shorters/webhook.d.ts +2 -2
  80. package/lib/common/types/resolvables.d.ts +2 -1
  81. package/lib/common/types/util.d.ts +4 -1
  82. package/lib/common/types/write.d.ts +1 -1
  83. package/lib/components/ActionRow.d.ts +4 -3
  84. package/lib/components/ActionRow.js +6 -3
  85. package/lib/components/BaseComponent.d.ts +18 -0
  86. package/lib/components/BaseComponent.js +21 -0
  87. package/lib/components/BaseSelectMenuComponent.d.ts +10 -0
  88. package/lib/components/BaseSelectMenuComponent.js +22 -0
  89. package/lib/components/ButtonComponent.d.ts +14 -14
  90. package/lib/components/ButtonComponent.js +36 -25
  91. package/lib/components/ChannelSelectMenuComponent.d.ts +4 -4
  92. package/lib/components/ChannelSelectMenuComponent.js +6 -5
  93. package/lib/components/MentionableSelectMenuComponent.d.ts +3 -2
  94. package/lib/components/MentionableSelectMenuComponent.js +4 -1
  95. package/lib/components/RoleSelectMenuComponent.d.ts +3 -2
  96. package/lib/components/RoleSelectMenuComponent.js +4 -1
  97. package/lib/components/StringSelectMenuComponent.d.ts +3 -4
  98. package/lib/components/StringSelectMenuComponent.js +3 -5
  99. package/lib/components/TextInputComponent.d.ts +10 -5
  100. package/lib/components/TextInputComponent.js +24 -7
  101. package/lib/components/UserSelectMenuComponent.d.ts +3 -2
  102. package/lib/components/UserSelectMenuComponent.js +4 -1
  103. package/lib/components/command.d.ts +6 -5
  104. package/lib/components/command.js +4 -0
  105. package/lib/components/componentcontext.d.ts +42 -0
  106. package/lib/components/componentcontext.js +79 -0
  107. package/lib/components/handler.d.ts +22 -6
  108. package/lib/components/handler.js +19 -12
  109. package/lib/components/index.d.ts +2 -2
  110. package/lib/components/index.js +9 -9
  111. package/lib/events/handler.d.ts +12 -3
  112. package/lib/events/handler.js +6 -8
  113. package/lib/events/hooks/application_command.d.ts +2 -2
  114. package/lib/events/hooks/auto_moderation.d.ts +4 -4
  115. package/lib/events/hooks/channel.d.ts +1 -1
  116. package/lib/events/hooks/dispatch.d.ts +1 -1
  117. package/lib/events/hooks/entitlement.d.ts +4 -4
  118. package/lib/events/hooks/guild.d.ts +42 -42
  119. package/lib/events/hooks/integration.d.ts +19 -19
  120. package/lib/events/hooks/interactions.d.ts +2 -2
  121. package/lib/events/hooks/invite.d.ts +5 -5
  122. package/lib/events/hooks/message.d.ts +6 -5
  123. package/lib/events/hooks/presence.d.ts +7 -7
  124. package/lib/events/hooks/stage.d.ts +4 -4
  125. package/lib/events/hooks/thread.d.ts +49 -49
  126. package/lib/events/hooks/typing.d.ts +2 -2
  127. package/lib/events/hooks/user.d.ts +1 -1
  128. package/lib/events/hooks/voice.d.ts +2 -2
  129. package/lib/events/hooks/webhook.d.ts +1 -1
  130. package/lib/index.d.ts +3 -6
  131. package/lib/index.js +6 -7
  132. package/lib/langs/handler.d.ts +10 -1
  133. package/lib/langs/handler.js +1 -0
  134. package/lib/structures/AutoModerationRule.d.ts +3 -2
  135. package/lib/structures/ClientUser.d.ts +1 -1
  136. package/lib/structures/Guild.d.ts +27 -27
  137. package/lib/structures/GuildEmoji.d.ts +2 -1
  138. package/lib/structures/GuildMember.d.ts +16 -6
  139. package/lib/structures/GuildMember.js +35 -6
  140. package/lib/structures/GuildPreview.d.ts +1 -1
  141. package/lib/structures/GuildRole.d.ts +2 -1
  142. package/lib/structures/GuildTemplate.d.ts +3 -2
  143. package/lib/structures/Interaction.d.ts +5 -5
  144. package/lib/structures/Interaction.js +34 -34
  145. package/lib/structures/Message.d.ts +6 -5
  146. package/lib/structures/Sticker.d.ts +2 -1
  147. package/lib/structures/User.d.ts +7 -3
  148. package/lib/structures/User.js +5 -0
  149. package/lib/structures/Webhook.d.ts +63 -4
  150. package/lib/structures/Webhook.js +53 -0
  151. package/lib/structures/channels.d.ts +4 -4
  152. package/lib/structures/extra/BaseGuild.d.ts +2 -1
  153. package/lib/structures/extra/BaseGuild.js +3 -3
  154. package/lib/structures/extra/BitField.d.ts +2 -2
  155. package/lib/structures/extra/BitField.js +2 -2
  156. package/lib/structures/extra/Permissions.d.ts +1 -1
  157. package/lib/structures/extra/functions.d.ts +2 -1
  158. package/lib/structures/extra/functions.js +2 -1
  159. package/lib/types/index.d.ts +1 -0
  160. package/lib/types/index.js +17 -0
  161. package/lib/websocket/SharedTypes.d.ts +2 -1
  162. package/lib/websocket/SharedTypes.js +1 -0
  163. package/lib/websocket/discord/shard.d.ts +2 -1
  164. package/lib/websocket/discord/shard.js +30 -41
  165. package/lib/websocket/discord/sharder.d.ts +3 -2
  166. package/lib/websocket/discord/sharder.js +7 -6
  167. package/lib/websocket/discord/shared.d.ts +2 -1
  168. package/lib/websocket/discord/worker.d.ts +1 -1
  169. package/lib/websocket/discord/workermanager.d.ts +3 -2
  170. package/lib/websocket/discord/workermanager.js +1 -1
  171. package/package.json +2 -2
@@ -54,12 +54,15 @@ class BaseGuildMember extends DiscordBase_1.DiscordBase {
54
54
  }
55
55
  get roles() {
56
56
  return {
57
- values: Object.freeze(this._roles),
57
+ keys: Object.freeze(this._roles.concat(this.guildId)),
58
+ list: (force = false) => this.client.roles
59
+ .list(this.guildId, force)
60
+ .then(roles => roles.filter(role => this.roles.keys.includes(role.id))),
58
61
  add: (id) => this.client.members.addRole(this.guildId, this.id, id),
59
62
  remove: (id) => this.client.members.removeRole(this.guildId, this.id, id),
60
- permissions: async () => new Permissions_1.PermissionsBitField(((await this.cache.roles?.bulk(this.roles.values)) ?? [])
61
- .filter(x => x)
62
- .map(x => BigInt(x.permissions.bits))),
63
+ permissions: (force = false) => this.roles.list(force).then(roles => new Permissions_1.PermissionsBitField(roles.map(x => BigInt(x.permissions.bits)))),
64
+ sorted: (force = false) => this.roles.list(force).then(roles => roles.sort((a, b) => b.position - a.position)),
65
+ highest: (force = false) => this.roles.sorted(force).then(roles => roles[0]),
63
66
  };
64
67
  }
65
68
  static methods({ client, guildId }) {
@@ -84,6 +87,7 @@ exports.BaseGuildMember = BaseGuildMember;
84
87
  class GuildMember extends BaseGuildMember {
85
88
  guildId;
86
89
  user;
90
+ __me;
87
91
  constructor(client, data, user,
88
92
  /** the choosen guild id */
89
93
  guildId) {
@@ -125,10 +129,35 @@ class GuildMember extends BaseGuildMember {
125
129
  }
126
130
  return this.rest.cdn.guildMemberAvatar(this.guildId, this.id, this.avatar, options);
127
131
  }
128
- async fetchPermissions() {
132
+ bannerURL(options) {
133
+ return this.user.bannerURL(options);
134
+ }
135
+ async fetchPermissions(force = false) {
129
136
  if ('permissions' in this)
130
137
  return this.permissions;
131
- return this.roles.permissions();
138
+ return this.roles.permissions(force);
139
+ }
140
+ async manageable(force = false) {
141
+ this.__me = await this.client.guilds.fetchSelf(this.guildId, force);
142
+ const ownerId = (await this.client.guilds.fetch(this.guildId, force)).ownerId;
143
+ if (this.user.id === ownerId)
144
+ return false;
145
+ if (this.user.id === this.client.botId)
146
+ return false;
147
+ if (this.client.botId === ownerId)
148
+ return true;
149
+ return (await this.__me.roles.highest()).position > (await this.roles.highest(force)).position;
150
+ }
151
+ async bannable(force = false) {
152
+ return (await this.manageable(force)) && (await this.__me.fetchPermissions(force)).has('BanMembers');
153
+ }
154
+ async kickable(force = false) {
155
+ return (await this.manageable(force)) && (await this.__me.fetchPermissions(force)).has('KickMembers');
156
+ }
157
+ async moderatable(force = false) {
158
+ return (!(await this.roles.permissions(force)).has('Administrator') &&
159
+ (await this.manageable(force)) &&
160
+ (await this.__me.fetchPermissions(force)).has('KickMembers'));
132
161
  }
133
162
  }
134
163
  exports.GuildMember = GuildMember;
@@ -1,5 +1,5 @@
1
+ import type { APIGuildPreview } from 'discord-api-types/v10';
1
2
  import type { UsingClient } from '../commands';
2
- import type { APIGuildPreview } from '../common';
3
3
  import { AnonymousGuild } from './AnonymousGuild';
4
4
  /**
5
5
  * Represent Discord Guild Preview Object
@@ -1,5 +1,6 @@
1
+ import type { APIRole, RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPostAPIGuildRoleJSONBody } from 'discord-api-types/v10';
1
2
  import type { UsingClient } from '../commands';
2
- import type { APIRole, MethodContext, ObjectToLower, RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPostAPIGuildRoleJSONBody } from '../common';
3
+ import type { MethodContext, ObjectToLower } from '../common';
3
4
  import { DiscordBase } from './extra/DiscordBase';
4
5
  import { PermissionsBitField } from './extra/Permissions';
5
6
  export interface GuildRole extends DiscordBase, ObjectToLower<Omit<APIRole, 'permissions'>> {
@@ -1,5 +1,6 @@
1
+ import type { APITemplate, RESTPatchAPIGuildTemplateJSONBody, RESTPostAPIGuildTemplatesJSONBody } from 'discord-api-types/v10';
1
2
  import type { UsingClient } from '../commands';
2
- import type { APITemplate, MethodContext, ObjectToLower, RESTPatchAPIGuildTemplateJSONBody, RESTPostAPIGuildTemplatesJSONBody } from '../common';
3
+ import type { MethodContext, ObjectToLower } from '../common';
3
4
  import { Base } from './extra/Base';
4
5
  export interface GuildTemplate extends Base, ObjectToLower<APITemplate> {
5
6
  }
@@ -14,7 +15,7 @@ export declare class GuildTemplate extends Base {
14
15
  guildId: string;
15
16
  }>): {
16
17
  fetch: (code: string) => Promise<APITemplate>;
17
- list: () => Promise<import("discord-api-types/rest/v10/template").RESTGetAPIGuildTemplatesResult>;
18
+ list: () => Promise<import("discord-api-types/v10").RESTGetAPIGuildTemplatesResult>;
18
19
  create: (body: RESTPostAPIGuildTemplatesJSONBody) => Promise<APITemplate>;
19
20
  sync: (code: string) => Promise<APITemplate>;
20
21
  edit: (code: string, body: RESTPatchAPIGuildTemplateJSONBody) => Promise<APITemplate>;
@@ -1,6 +1,6 @@
1
+ import { type APIApplicationCommandAutocompleteInteraction, type APIApplicationCommandInteraction, type APIBaseInteraction, type APIChatInputApplicationCommandInteraction, type APIChatInputApplicationCommandInteractionData, type APICommandAutocompleteInteractionResponseCallbackData, type APIInteraction, type APIInteractionResponse, type APIInteractionResponseChannelMessageWithSource, type APIInteractionResponseDeferredChannelMessageWithSource, type APIInteractionResponseDeferredMessageUpdate, type APIInteractionResponsePong, type APIInteractionResponseUpdateMessage, type APIMessageApplicationCommandInteraction, type APIMessageApplicationCommandInteractionData, type APIMessageButtonInteractionData, type APIMessageComponentInteraction, type APIMessageComponentSelectMenuInteraction, type APIMessageStringSelectInteractionData, type APIModalSubmission, type APIModalSubmitInteraction, type APIUserApplicationCommandInteraction, type APIUserApplicationCommandInteractionData, ApplicationCommandType, ComponentType, type GatewayInteractionCreateDispatchData, InteractionResponseType, InteractionType, type MessageFlags, type RESTPostAPIInteractionCallbackJSONBody } from 'discord-api-types/v10';
1
2
  import { OptionResolver, type UsingClient } from '../commands';
2
- import type { APIApplicationCommandAutocompleteInteraction, APIApplicationCommandInteraction, APIBaseInteraction, APIChatInputApplicationCommandInteraction, APIChatInputApplicationCommandInteractionData, APICommandAutocompleteInteractionResponseCallbackData, APIInteraction, APIInteractionResponse, APIInteractionResponseChannelMessageWithSource, APIInteractionResponseDeferredChannelMessageWithSource, APIInteractionResponseDeferredMessageUpdate, APIInteractionResponsePong, APIInteractionResponseUpdateMessage, APIMessageApplicationCommandInteraction, APIMessageApplicationCommandInteractionData, APIMessageButtonInteractionData, APIMessageComponentInteraction, APIMessageComponentSelectMenuInteraction, APIMessageStringSelectInteractionData, APIModalSubmission, APIModalSubmitInteraction, APIUserApplicationCommandInteraction, APIUserApplicationCommandInteractionData, GatewayInteractionCreateDispatchData, MessageFlags, ObjectToLower, OmitInsert, RESTPostAPIInteractionCallbackJSONBody, ToClass, When } from '../common';
3
- import { ApplicationCommandType, ComponentType, InteractionResponseType, InteractionType } from '../common';
3
+ import type { ObjectToLower, OmitInsert, ToClass, When } from '../common';
4
4
  import type { ComponentInteractionMessageUpdate, InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest, MessageCreateBodyRequest, MessageUpdateBodyRequest, MessageWebhookCreateBodyRequest, ModalCreateBodyRequest } from '../common/types/write';
5
5
  import { InteractionGuildMember, type AllChannels } from './';
6
6
  import { GuildRole } from './GuildRole';
@@ -32,7 +32,7 @@ export declare class BaseInteraction<FromGuild extends boolean = boolean, Type e
32
32
  private matchReplied;
33
33
  reply(body: ReplyInteractionBody): Promise<void>;
34
34
  deferReply(flags?: MessageFlags): Promise<void>;
35
- static from(client: UsingClient, gateway: GatewayInteractionCreateDispatchData, __reply?: __InternalReplyFunction): StringSelectMenuInteraction<string[]> | AutocompleteInteraction<boolean> | BaseInteraction<boolean, import("discord-api-types/payloads/v10/_interactions/ping").APIPingInteraction>;
35
+ static from(client: UsingClient, gateway: GatewayInteractionCreateDispatchData, __reply?: __InternalReplyFunction): StringSelectMenuInteraction<string[]> | AutocompleteInteraction<boolean> | BaseInteraction<boolean, import("discord-api-types/v10").APIPingInteraction>;
36
36
  fetchGuild(force?: boolean): Promise<import("./Guild").Guild<"cached"> | import("./Guild").Guild<"api">> | undefined;
37
37
  }
38
38
  export type AllInteractions = AutocompleteInteraction | ChatInputCommandInteraction | UserCommandInteraction | MessageCommandInteraction | ComponentInteraction | SelectMenuInteraction | ModalSubmitInteraction | BaseInteraction;
@@ -57,8 +57,8 @@ export declare class Interaction<FromGuild extends boolean = boolean, Type exten
57
57
  editOrReply<FR extends boolean = false>(body: InteractionCreateBodyRequest, fetchReply?: FR): Promise<When<FR, WebhookMessage, void>>;
58
58
  editMessage(messageId: string, body: InteractionMessageUpdateBodyRequest): Promise<Message>;
59
59
  editResponse(body: InteractionMessageUpdateBodyRequest): Promise<Message>;
60
- deleteResponse(): Promise<void>;
61
- deleteMessage(messageId: string): Promise<void>;
60
+ deleteResponse(): Promise<void | undefined>;
61
+ deleteMessage(messageId: string): Promise<void | undefined>;
62
62
  createResponse({ files, ...body }: MessageWebhookCreateBodyRequest): Promise<Message>;
63
63
  }
64
64
  export declare class ApplicationCommandInteraction<FromGuild extends boolean = boolean, Type extends APIApplicationCommandInteraction = APIApplicationCommandInteraction> extends Interaction<FromGuild, Type> {
@@ -10,10 +10,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ModalSubmitInteraction = exports.MessageCommandInteraction = exports.UserCommandInteraction = exports.ChatInputCommandInteraction = exports.UserSelectMenuInteraction = exports.RoleSelectMenuInteraction = exports.MentionableSelectMenuInteraction = exports.ChannelSelectMenuInteraction = exports.StringSelectMenuInteraction = exports.SelectMenuInteraction = exports.ButtonInteraction = exports.ComponentInteraction = exports.ApplicationCommandInteraction = exports.Interaction = exports.AutocompleteInteraction = exports.BaseInteraction = void 0;
13
+ const v10_1 = require("discord-api-types/v10");
13
14
  const ts_mixer_1 = require("ts-mixer");
14
15
  const builders_1 = require("../builders");
15
16
  const commands_1 = require("../commands");
16
- const common_1 = require("../common");
17
17
  const _1 = require("./");
18
18
  const GuildRole_1 = require("./GuildRole");
19
19
  const Message_1 = require("./Message");
@@ -50,12 +50,12 @@ class BaseInteraction extends DiscordBase_1.DiscordBase {
50
50
  }
51
51
  static transformBodyRequest(body) {
52
52
  switch (body.type) {
53
- case common_1.InteractionResponseType.ApplicationCommandAutocompleteResult:
54
- case common_1.InteractionResponseType.DeferredMessageUpdate:
55
- case common_1.InteractionResponseType.DeferredChannelMessageWithSource:
53
+ case v10_1.InteractionResponseType.ApplicationCommandAutocompleteResult:
54
+ case v10_1.InteractionResponseType.DeferredMessageUpdate:
55
+ case v10_1.InteractionResponseType.DeferredChannelMessageWithSource:
56
56
  return body;
57
- case common_1.InteractionResponseType.ChannelMessageWithSource:
58
- case common_1.InteractionResponseType.UpdateMessage:
57
+ case v10_1.InteractionResponseType.ChannelMessageWithSource:
58
+ case v10_1.InteractionResponseType.UpdateMessage:
59
59
  return {
60
60
  type: body.type,
61
61
  // @ts-ignore
@@ -68,7 +68,7 @@ class BaseInteraction extends DiscordBase_1.DiscordBase {
68
68
  attachments: body.data?.attachments?.map((x, i) => ({ id: i, ...(0, builders_1.resolveAttachment)(x) })) ?? undefined,
69
69
  },
70
70
  };
71
- case common_1.InteractionResponseType.Modal:
71
+ case v10_1.InteractionResponseType.Modal:
72
72
  return {
73
73
  type: body.type,
74
74
  data: body.data instanceof builders_1.Modal
@@ -122,7 +122,7 @@ class BaseInteraction extends DiscordBase_1.DiscordBase {
122
122
  }
123
123
  deferReply(flags) {
124
124
  return this.reply({
125
- type: common_1.InteractionResponseType.DeferredChannelMessageWithSource,
125
+ type: v10_1.InteractionResponseType.DeferredChannelMessageWithSource,
126
126
  data: {
127
127
  flags,
128
128
  },
@@ -130,35 +130,35 @@ class BaseInteraction extends DiscordBase_1.DiscordBase {
130
130
  }
131
131
  static from(client, gateway, __reply) {
132
132
  switch (gateway.type) {
133
- case common_1.InteractionType.ApplicationCommandAutocomplete:
133
+ case v10_1.InteractionType.ApplicationCommandAutocomplete:
134
134
  return new AutocompleteInteraction(client, gateway, __reply);
135
135
  // biome-ignore lint/suspicious/noFallthroughSwitchClause: bad interaction between biome and ts-server
136
- case common_1.InteractionType.ApplicationCommand:
136
+ case v10_1.InteractionType.ApplicationCommand:
137
137
  switch (gateway.data.type) {
138
- case common_1.ApplicationCommandType.ChatInput:
138
+ case v10_1.ApplicationCommandType.ChatInput:
139
139
  return new ChatInputCommandInteraction(client, gateway, __reply);
140
- case common_1.ApplicationCommandType.User:
140
+ case v10_1.ApplicationCommandType.User:
141
141
  return new UserCommandInteraction(client, gateway, __reply);
142
- case common_1.ApplicationCommandType.Message:
142
+ case v10_1.ApplicationCommandType.Message:
143
143
  return new MessageCommandInteraction(client, gateway, __reply);
144
144
  }
145
145
  // biome-ignore lint/suspicious/noFallthroughSwitchClause: bad interaction between biome and ts-server
146
- case common_1.InteractionType.MessageComponent:
146
+ case v10_1.InteractionType.MessageComponent:
147
147
  switch (gateway.data.component_type) {
148
- case common_1.ComponentType.Button:
148
+ case v10_1.ComponentType.Button:
149
149
  return new ButtonInteraction(client, gateway, __reply);
150
- case common_1.ComponentType.ChannelSelect:
150
+ case v10_1.ComponentType.ChannelSelect:
151
151
  return new ChannelSelectMenuInteraction(client, gateway, __reply);
152
- case common_1.ComponentType.RoleSelect:
152
+ case v10_1.ComponentType.RoleSelect:
153
153
  return new RoleSelectMenuInteraction(client, gateway, __reply);
154
- case common_1.ComponentType.MentionableSelect:
154
+ case v10_1.ComponentType.MentionableSelect:
155
155
  return new MentionableSelectMenuInteraction(client, gateway, __reply);
156
- case common_1.ComponentType.UserSelect:
156
+ case v10_1.ComponentType.UserSelect:
157
157
  return new UserSelectMenuInteraction(client, gateway, __reply);
158
- case common_1.ComponentType.StringSelect:
158
+ case v10_1.ComponentType.StringSelect:
159
159
  return new StringSelectMenuInteraction(client, gateway, __reply);
160
160
  }
161
- case common_1.InteractionType.ModalSubmit:
161
+ case v10_1.InteractionType.ModalSubmit:
162
162
  return new ModalSubmitInteraction(client, gateway);
163
163
  default:
164
164
  return new BaseInteraction(client, gateway);
@@ -181,7 +181,7 @@ class AutocompleteInteraction extends BaseInteraction {
181
181
  return this.options.getAutocompleteValue() ?? '';
182
182
  }
183
183
  respond(choices) {
184
- return super.reply({ data: { choices }, type: common_1.InteractionResponseType.ApplicationCommandAutocompleteResult });
184
+ return super.reply({ data: { choices }, type: v10_1.InteractionResponseType.ApplicationCommandAutocompleteResult });
185
185
  }
186
186
  /** @intenal */
187
187
  async reply(..._args) {
@@ -198,7 +198,7 @@ class Interaction extends BaseInteraction {
198
198
  }
199
199
  async write(body, fetchReply) {
200
200
  (await this.reply({
201
- type: common_1.InteractionResponseType.ChannelMessageWithSource,
201
+ type: v10_1.InteractionResponseType.ChannelMessageWithSource,
202
202
  data: body,
203
203
  }));
204
204
  if (fetchReply)
@@ -207,7 +207,7 @@ class Interaction extends BaseInteraction {
207
207
  }
208
208
  modal(body) {
209
209
  return this.reply({
210
- type: common_1.InteractionResponseType.Modal,
210
+ type: v10_1.InteractionResponseType.Modal,
211
211
  data: body,
212
212
  });
213
213
  }
@@ -240,7 +240,7 @@ class Interaction extends BaseInteraction {
240
240
  .webhooks(this.applicationId)(this.token)
241
241
  .messages(messageId)
242
242
  .delete()
243
- .then(() => this.client.components.onMessageDelete(messageId === '@original' ? this.id : messageId));
243
+ .then(() => this.client.components?.onMessageDelete(messageId === '@original' ? this.id : messageId));
244
244
  }
245
245
  async createResponse({ files, ...body }) {
246
246
  files ??= files ? await (0, builders_1.resolveFiles)(files) : undefined;
@@ -255,7 +255,7 @@ class Interaction extends BaseInteraction {
255
255
  }
256
256
  exports.Interaction = Interaction;
257
257
  class ApplicationCommandInteraction extends Interaction {
258
- type = common_1.ApplicationCommandType.ChatInput;
258
+ type = v10_1.ApplicationCommandType.ChatInput;
259
259
  respond(data) {
260
260
  return this.reply(data);
261
261
  }
@@ -264,13 +264,13 @@ exports.ApplicationCommandInteraction = ApplicationCommandInteraction;
264
264
  class ComponentInteraction extends Interaction {
265
265
  update(data) {
266
266
  return this.reply({
267
- type: common_1.InteractionResponseType.UpdateMessage,
267
+ type: v10_1.InteractionResponseType.UpdateMessage,
268
268
  data,
269
269
  });
270
270
  }
271
271
  deferUpdate() {
272
272
  return this.reply({
273
- type: common_1.InteractionResponseType.DeferredMessageUpdate,
273
+ type: v10_1.InteractionResponseType.DeferredMessageUpdate,
274
274
  });
275
275
  }
276
276
  get customId() {
@@ -280,22 +280,22 @@ class ComponentInteraction extends Interaction {
280
280
  return this.data.componentType;
281
281
  }
282
282
  isButton() {
283
- return this.data.componentType === common_1.ComponentType.Button;
283
+ return this.data.componentType === v10_1.ComponentType.Button;
284
284
  }
285
285
  isChannelSelectMenu() {
286
- return this.componentType === common_1.ComponentType.ChannelSelect;
286
+ return this.componentType === v10_1.ComponentType.ChannelSelect;
287
287
  }
288
288
  isRoleSelectMenu() {
289
- return this.componentType === common_1.ComponentType.RoleSelect;
289
+ return this.componentType === v10_1.ComponentType.RoleSelect;
290
290
  }
291
291
  isMentionableSelectMenu() {
292
- return this.componentType === common_1.ComponentType.MentionableSelect;
292
+ return this.componentType === v10_1.ComponentType.MentionableSelect;
293
293
  }
294
294
  isUserSelectMenu() {
295
- return this.componentType === common_1.ComponentType.UserSelect;
295
+ return this.componentType === v10_1.ComponentType.UserSelect;
296
296
  }
297
297
  isStringSelectMenu() {
298
- return this.componentType === common_1.ComponentType.StringSelect;
298
+ return this.componentType === v10_1.ComponentType.StringSelect;
299
299
  }
300
300
  }
301
301
  exports.ComponentInteraction = ComponentInteraction;
@@ -1,6 +1,7 @@
1
+ import type { APIChannelMention, APIMessage, GatewayMessageCreateDispatchData } from 'discord-api-types/v10';
1
2
  import type { ListenerOptions } from '../builders';
2
3
  import type { UsingClient } from '../commands';
3
- import type { APIChannelMention, APIMessage, GatewayMessageCreateDispatchData, ObjectToLower } from '../common';
4
+ import type { ObjectToLower } from '../common';
4
5
  import type { EmojiResolvable } from '../common/types/resolvables';
5
6
  import type { MessageCreateBodyRequest, MessageUpdateBodyRequest } from '../common/types/write';
6
7
  import type { ActionRowMessageComponents } from '../components';
@@ -26,8 +27,8 @@ export declare class BaseMessage extends DiscordBase {
26
27
  constructor(client: UsingClient, data: MessageData);
27
28
  get user(): User;
28
29
  createComponentCollector(options?: ListenerOptions): {
29
- run: (customId: string | RegExp | string[], callback: import("../builders").ComponentCallback) => any;
30
- stop: (reason?: string | undefined) => void;
30
+ run<T extends import("./Interaction").StringSelectMenuInteraction<string[]> | import("./Interaction").ComponentInteraction<boolean, import("discord-api-types/v10").APIMessageComponentInteraction> = import("./Interaction").StringSelectMenuInteraction<string[]> | import("./Interaction").ComponentInteraction<boolean, import("discord-api-types/v10").APIMessageComponentInteraction>>(customId: string | RegExp | string[], callback: import("../builders").ComponentCallback<T>): any;
31
+ stop(reason?: string | undefined): any;
31
32
  };
32
33
  get url(): string;
33
34
  guild(force?: boolean): Promise<import("./Guild").Guild<"cached"> | import("./Guild").Guild<"api">> | undefined;
@@ -43,7 +44,7 @@ export declare class Message extends BaseMessage {
43
44
  reply(body: Omit<MessageCreateBodyRequest, 'message_reference'>, fail?: boolean): Promise<Message>;
44
45
  edit(body: MessageUpdateBodyRequest): Promise<Message>;
45
46
  write(body: MessageCreateBodyRequest): Promise<Message>;
46
- delete(reason?: string): Promise<void>;
47
+ delete(reason?: string): Promise<void | undefined>;
47
48
  crosspost(reason?: string): Promise<Message>;
48
49
  }
49
50
  export type EditMessageWebhook = Omit<MessageWebhookMethodEditParams, 'messageId'>;
@@ -52,7 +53,7 @@ export declare class WebhookMessage extends BaseMessage {
52
53
  readonly webhookId: string;
53
54
  readonly webhookToken: string;
54
55
  constructor(client: UsingClient, data: MessageData, webhookId: string, webhookToken: string);
55
- fetch(): Promise<import("discord-api-types/rest/v10/webhook").RESTGetAPIWebhookWithTokenResult>;
56
+ fetch(): Promise<import("discord-api-types/v10").RESTGetAPIWebhookWithTokenResult>;
56
57
  edit(body: EditMessageWebhook): Promise<WebhookMessage>;
57
58
  write(body: WriteMessageWebhook): Promise<WebhookMessage | null>;
58
59
  delete(reason?: string): Promise<never>;
@@ -1,6 +1,7 @@
1
+ import type { APISticker, RESTPatchAPIGuildStickerJSONBody, RESTPostAPIGuildStickerFormDataBody } from 'discord-api-types/v10';
1
2
  import type { UsingClient } from '..';
2
3
  import type { Attachment } from '../builders';
3
- import type { APISticker, MethodContext, ObjectToLower, RESTPatchAPIGuildStickerJSONBody, RESTPostAPIGuildStickerFormDataBody } from '../common';
4
+ import type { MethodContext, ObjectToLower } from '../common';
4
5
  import { User } from './User';
5
6
  import { DiscordBase } from './extra/DiscordBase';
6
7
  export interface Sticker extends DiscordBase, ObjectToLower<Omit<APISticker, 'user'>> {
@@ -1,4 +1,5 @@
1
- import type { APIUser, MessageCreateBodyRequest, ObjectToLower } from '../common';
1
+ import type { APIUser } from 'discord-api-types/v10';
2
+ import type { MessageCreateBodyRequest, ObjectToLower } from '../common';
2
3
  import type { ImageOptions } from '../common/types/options';
3
4
  import { DiscordBase } from './extra/DiscordBase';
4
5
  export interface User extends ObjectToLower<APIUser> {
@@ -16,8 +17,11 @@ export declare class User extends DiscordBase<APIUser> {
16
17
  dm(force?: boolean): Promise<import("./channels").DMChannel>;
17
18
  write(body: MessageCreateBodyRequest): Promise<import("./Message").Message>;
18
19
  avatarURL(options?: ImageOptions): string;
19
- presence(): import("..").ReturnCache<(Omit<import("discord-api-types/payloads/v10/gateway").GatewayPresenceUpdate, "user"> & {
20
- id: string;
20
+ bannerURL(options?: ImageOptions): string | undefined;
21
+ presence(): import("..").ReturnCache<(Omit<import("discord-api-types/v10").GatewayPresenceUpdate, "user"> & {
22
+ id: string; /**
23
+ * Fetch user
24
+ */
21
25
  } & {
22
26
  guild_id: string;
23
27
  }) | undefined>;
@@ -30,6 +30,11 @@ class User extends DiscordBase_1.DiscordBase {
30
30
  }
31
31
  return this.rest.cdn.avatar(this.id, this.avatar, options);
32
32
  }
33
+ bannerURL(options) {
34
+ if (!this.banner)
35
+ return;
36
+ return this.rest.cdn.banner(this.id, this.banner, options);
37
+ }
33
38
  presence() {
34
39
  return this.cache.presences?.get(this.id);
35
40
  }
@@ -1,42 +1,101 @@
1
+ /**
2
+ * Represents a Discord webhook.
3
+ */
4
+ import type { APIWebhook, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookJSONBody, RESTPatchAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery } from 'discord-api-types/v10';
1
5
  import type { UsingClient } from '../commands';
2
- import type { APIWebhook, ImageOptions, MessageWebhookCreateBodyRequest, MessageWebhookPayload, MessageWebhookUpdateBodyRequest, MethodContext, ObjectToLower, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookJSONBody, RESTPatchAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery } from '../common';
6
+ import type { ImageOptions, MessageWebhookCreateBodyRequest, MessageWebhookPayload, MessageWebhookUpdateBodyRequest, MethodContext, ObjectToLower } from '../common';
3
7
  import { AnonymousGuild } from './AnonymousGuild';
4
8
  import { User } from './User';
5
9
  import { DiscordBase } from './extra/DiscordBase';
6
10
  export interface Webhook extends DiscordBase, ObjectToLower<Omit<APIWebhook, 'user' | 'source_guild'>> {
7
11
  }
12
+ /**
13
+ * Represents a Discord webhook.
14
+ */
8
15
  export declare class Webhook extends DiscordBase {
16
+ /** The user associated with the webhook, if applicable. */
9
17
  user?: User;
18
+ /** The source guild of the webhook, if applicable. */
10
19
  sourceGuild?: Partial<AnonymousGuild>;
20
+ /** Methods related to interacting with messages through the webhook. */
11
21
  messages: ReturnType<typeof Webhook.messages>;
22
+ /**
23
+ * Constructs a new Webhook instance.
24
+ * @param client The Discord client instance.
25
+ * @param data The data representing the webhook.
26
+ */
12
27
  constructor(client: UsingClient, data: APIWebhook);
28
+ /**
29
+ * Fetches the guild associated with the webhook.
30
+ * @param force Whether to force fetching the guild even if it's already cached.
31
+ * @returns A promise that resolves to the guild associated with the webhook, or undefined if not applicable.
32
+ */
13
33
  guild(force?: boolean): Promise<import("./Guild").Guild<"cached"> | import("./Guild").Guild<"api">> | undefined;
14
- channel(force?: boolean): Promise<import("./channels").BaseChannel<import("discord-api-types/payloads/v10/channel").ChannelType> | import("./channels").DMChannel | import("./channels").CategoryChannel | undefined>;
34
+ /**
35
+ * Fetches the channel associated with the webhook.
36
+ * @param force Whether to force fetching the channel even if it's already cached.
37
+ * @returns A promise that resolves to the channel associated with the webhook, or undefined if not applicable.
38
+ */
39
+ channel(force?: boolean): Promise<import("./channels").BaseChannel<import("discord-api-types/v10").ChannelType> | import("./channels").DMChannel | import("./channels").CategoryChannel | undefined>;
40
+ /**
41
+ * Retrieves the avatar URL of the webhook.
42
+ * @param options The image options for the avatar.
43
+ * @returns The avatar URL of the webhook, or null if no avatar is set.
44
+ */
15
45
  avatarURL(options?: ImageOptions): string | null;
46
+ /**
47
+ * Fetches the webhook data from the Discord API.
48
+ * @returns A promise that resolves to the fetched webhook data.
49
+ */
16
50
  fetch(): Promise<Webhook>;
17
- edit(body: RESTPatchAPIWebhookJSONBody | RESTPatchAPIWebhookWithTokenJSONBody, reason?: string): Promise<import("discord-api-types/rest/v10/webhook").RESTGetAPIWebhookWithTokenResult>;
51
+ /**
52
+ * Edits the webhook.
53
+ * @param body The new webhook data.
54
+ * @param reason The reason for editing the webhook.
55
+ * @returns A promise that resolves when the webhook is successfully edited.
56
+ */
57
+ edit(body: RESTPatchAPIWebhookJSONBody | RESTPatchAPIWebhookWithTokenJSONBody, reason?: string): Promise<import("discord-api-types/v10").RESTGetAPIWebhookWithTokenResult>;
58
+ /**
59
+ * Deletes the webhook.
60
+ * @param reason The reason for deleting the webhook.
61
+ * @returns A promise that resolves when the webhook is successfully deleted.
62
+ */
18
63
  delete(reason?: string): Promise<never>;
64
+ /**
65
+ * Static methods related to interacting with messages through webhooks.
66
+ */
19
67
  static messages({ client, webhookId, webhookToken }: MethodContext<{
20
68
  webhookId: string;
21
69
  webhookToken: string;
22
70
  }>): {
71
+ /** Writes a message through the webhook. */
23
72
  write: (payload: MessageWebhookMethodWriteParams) => Promise<import("./Message").WebhookMessage | null>;
73
+ /** Edits a message sent through the webhook. */
24
74
  edit: (payload: MessageWebhookMethodEditParams) => Promise<import("./Message").WebhookMessage>;
75
+ /** Deletes a message sent through the webhook. */
25
76
  delete: (messageId: string, reason?: string) => Promise<never>;
26
77
  };
78
+ /**
79
+ * Static methods related to managing webhooks.
80
+ */
27
81
  static methods({ client, webhookId, webhookToken }: MethodContext<{
28
82
  webhookId: string;
29
83
  webhookToken?: string;
30
84
  }>): {
85
+ /** Deletes the webhook. */
31
86
  delete: (reason?: string) => Promise<never>;
32
- edit: (body: RESTPatchAPIWebhookWithTokenJSONBody | RESTPatchAPIWebhookJSONBody, reason?: string) => Promise<import("discord-api-types/rest/v10/webhook").RESTGetAPIWebhookWithTokenResult>;
87
+ /** Edits the webhook. */
88
+ edit: (body: RESTPatchAPIWebhookWithTokenJSONBody | RESTPatchAPIWebhookJSONBody, reason?: string) => Promise<import("discord-api-types/v10").RESTGetAPIWebhookWithTokenResult>;
89
+ /** Fetches the webhook data from the Discord API. */
33
90
  fetch: () => Promise<Webhook>;
34
91
  };
35
92
  }
93
+ /** Type definition for parameters of editing a message through a webhook. */
36
94
  export type MessageWebhookMethodEditParams = MessageWebhookPayload<MessageWebhookUpdateBodyRequest, {
37
95
  messageId: string;
38
96
  query?: RESTGetAPIWebhookWithTokenMessageQuery;
39
97
  }>;
98
+ /** Type definition for parameters of writing a message through a webhook. */
40
99
  export type MessageWebhookMethodWriteParams = MessageWebhookPayload<MessageWebhookCreateBodyRequest, {
41
100
  query?: RESTPostAPIWebhookWithTokenQuery;
42
101
  }>;
@@ -4,10 +4,21 @@ exports.Webhook = void 0;
4
4
  const AnonymousGuild_1 = require("./AnonymousGuild");
5
5
  const User_1 = require("./User");
6
6
  const DiscordBase_1 = require("./extra/DiscordBase");
7
+ /**
8
+ * Represents a Discord webhook.
9
+ */
7
10
  class Webhook extends DiscordBase_1.DiscordBase {
11
+ /** The user associated with the webhook, if applicable. */
8
12
  user;
13
+ /** The source guild of the webhook, if applicable. */
9
14
  sourceGuild;
15
+ /** Methods related to interacting with messages through the webhook. */
10
16
  messages;
17
+ /**
18
+ * Constructs a new Webhook instance.
19
+ * @param client The Discord client instance.
20
+ * @param data The data representing the webhook.
21
+ */
11
22
  constructor(client, data) {
12
23
  super(client, data);
13
24
  if (data.user) {
@@ -20,42 +31,84 @@ class Webhook extends DiscordBase_1.DiscordBase {
20
31
  messages: Webhook.messages({ client, webhookId: this.id, webhookToken: this.token }),
21
32
  });
22
33
  }
34
+ /**
35
+ * Fetches the guild associated with the webhook.
36
+ * @param force Whether to force fetching the guild even if it's already cached.
37
+ * @returns A promise that resolves to the guild associated with the webhook, or undefined if not applicable.
38
+ */
23
39
  guild(force = false) {
24
40
  if (!this.sourceGuild?.id)
25
41
  return;
26
42
  return this.client.guilds.fetch(this.sourceGuild.id, force);
27
43
  }
44
+ /**
45
+ * Fetches the channel associated with the webhook.
46
+ * @param force Whether to force fetching the channel even if it's already cached.
47
+ * @returns A promise that resolves to the channel associated with the webhook, or undefined if not applicable.
48
+ */
28
49
  async channel(force = false) {
29
50
  if (!this.sourceChannel?.id)
30
51
  return;
31
52
  return this.client.channels.fetch(this.sourceChannel.id, force);
32
53
  }
54
+ /**
55
+ * Retrieves the avatar URL of the webhook.
56
+ * @param options The image options for the avatar.
57
+ * @returns The avatar URL of the webhook, or null if no avatar is set.
58
+ */
33
59
  avatarURL(options) {
34
60
  if (!this.avatar) {
35
61
  return null;
36
62
  }
37
63
  return this.rest.cdn.avatar(this.id, this.avatar, options);
38
64
  }
65
+ /**
66
+ * Fetches the webhook data from the Discord API.
67
+ * @returns A promise that resolves to the fetched webhook data.
68
+ */
39
69
  async fetch() {
40
70
  return this.client.webhooks.fetch(this.id, this.token);
41
71
  }
72
+ /**
73
+ * Edits the webhook.
74
+ * @param body The new webhook data.
75
+ * @param reason The reason for editing the webhook.
76
+ * @returns A promise that resolves when the webhook is successfully edited.
77
+ */
42
78
  async edit(body, reason) {
43
79
  return this.client.webhooks.edit(this.id, body, { reason, token: this.token });
44
80
  }
81
+ /**
82
+ * Deletes the webhook.
83
+ * @param reason The reason for deleting the webhook.
84
+ * @returns A promise that resolves when the webhook is successfully deleted.
85
+ */
45
86
  delete(reason) {
46
87
  return this.client.webhooks.delete(this.id, { token: this.token, reason });
47
88
  }
89
+ /**
90
+ * Static methods related to interacting with messages through webhooks.
91
+ */
48
92
  static messages({ client, webhookId, webhookToken }) {
49
93
  return {
94
+ /** Writes a message through the webhook. */
50
95
  write: (payload) => client.webhooks.writeMessage(webhookId, webhookToken, payload),
96
+ /** Edits a message sent through the webhook. */
51
97
  edit: (payload) => client.webhooks.editMessage(webhookId, webhookToken, payload),
98
+ /** Deletes a message sent through the webhook. */
52
99
  delete: (messageId, reason) => client.webhooks.deleteMessage(webhookId, webhookToken, messageId, reason),
53
100
  };
54
101
  }
102
+ /**
103
+ * Static methods related to managing webhooks.
104
+ */
55
105
  static methods({ client, webhookId, webhookToken }) {
56
106
  return {
107
+ /** Deletes the webhook. */
57
108
  delete: (reason) => client.webhooks.delete(webhookId, { reason, token: webhookToken }),
109
+ /** Edits the webhook. */
58
110
  edit: (body, reason) => client.webhooks.edit(webhookId, body, { token: webhookToken, reason }),
111
+ /** Fetches the webhook data from the Discord API. */
59
112
  fetch: () => client.webhooks.fetch(webhookId, webhookToken),
60
113
  };
61
114
  }