disgroove 1.2.9-dev.e013266 → 1.3.0-dev.4d9f89d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/Client.d.ts +37 -37
  2. package/dist/Client.js +75 -75
  3. package/dist/Client.js.map +1 -1
  4. package/dist/constants.d.ts +1 -0
  5. package/dist/constants.js +1 -0
  6. package/dist/constants.js.map +1 -1
  7. package/dist/gateway/Shard.js +27 -1
  8. package/dist/gateway/Shard.js.map +1 -1
  9. package/dist/rest/RequestsManager.js +1 -1
  10. package/dist/structures/Application.d.ts +67 -67
  11. package/dist/structures/Application.js +150 -150
  12. package/dist/structures/Application.js.map +1 -1
  13. package/dist/structures/ApplicationCommand.d.ts +4 -4
  14. package/dist/structures/ApplicationCommand.js +19 -19
  15. package/dist/structures/ApplicationCommand.js.map +1 -1
  16. package/dist/structures/AutoModerationRule.d.ts +2 -2
  17. package/dist/structures/AutoModerationRule.js +7 -7
  18. package/dist/structures/AutoModerationRule.js.map +1 -1
  19. package/dist/structures/Channel.d.ts +126 -126
  20. package/dist/structures/Channel.js +258 -258
  21. package/dist/structures/Channel.js.map +1 -1
  22. package/dist/structures/Emoji.d.ts +2 -2
  23. package/dist/structures/Emoji.js +9 -9
  24. package/dist/structures/Emoji.js.map +1 -1
  25. package/dist/structures/Guild.d.ts +305 -305
  26. package/dist/structures/Guild.js +617 -624
  27. package/dist/structures/Guild.js.map +1 -1
  28. package/dist/structures/GuildMember.d.ts +9 -9
  29. package/dist/structures/GuildMember.js +30 -30
  30. package/dist/structures/GuildMember.js.map +1 -1
  31. package/dist/structures/GuildScheduledEvent.d.ts +2 -2
  32. package/dist/structures/GuildScheduledEvent.js +5 -5
  33. package/dist/structures/GuildScheduledEvent.js.map +1 -1
  34. package/dist/structures/GuildTemplate.d.ts +4 -4
  35. package/dist/structures/GuildTemplate.js +9 -9
  36. package/dist/structures/GuildTemplate.js.map +1 -1
  37. package/dist/structures/Integration.js +2 -2
  38. package/dist/structures/Integration.js.map +1 -1
  39. package/dist/structures/Interaction.d.ts +24 -24
  40. package/dist/structures/Interaction.js +88 -67
  41. package/dist/structures/Interaction.js.map +1 -1
  42. package/dist/structures/Invite.js +1 -1
  43. package/dist/structures/Invite.js.map +1 -1
  44. package/dist/structures/Message.d.ts +20 -17
  45. package/dist/structures/Message.js +81 -55
  46. package/dist/structures/Message.js.map +1 -1
  47. package/dist/structures/PartialApplication.d.ts +67 -67
  48. package/dist/structures/PartialApplication.js +150 -150
  49. package/dist/structures/PartialApplication.js.map +1 -1
  50. package/dist/structures/Role.d.ts +2 -2
  51. package/dist/structures/Role.js +7 -7
  52. package/dist/structures/Role.js.map +1 -1
  53. package/dist/structures/StageInstance.d.ts +2 -2
  54. package/dist/structures/StageInstance.js +7 -7
  55. package/dist/structures/StageInstance.js.map +1 -1
  56. package/dist/structures/Sticker.d.ts +2 -2
  57. package/dist/structures/Sticker.js +9 -9
  58. package/dist/structures/Sticker.js.map +1 -1
  59. package/dist/structures/Team.js +2 -2
  60. package/dist/structures/Team.js.map +1 -1
  61. package/dist/structures/UnavailableGuild.d.ts +305 -305
  62. package/dist/structures/UnavailableGuild.js +609 -610
  63. package/dist/structures/UnavailableGuild.js.map +1 -1
  64. package/dist/structures/User.d.ts +11 -11
  65. package/dist/structures/User.js +35 -34
  66. package/dist/structures/User.js.map +1 -1
  67. package/dist/structures/Webhook.d.ts +26 -26
  68. package/dist/structures/Webhook.js +115 -147
  69. package/dist/structures/Webhook.js.map +1 -1
  70. package/dist/types/interaction.d.ts +12 -12
  71. package/dist/types/message-components.d.ts +4 -4
  72. package/dist/utils/Util.d.ts +8 -482
  73. package/dist/utils/Util.js +169 -150
  74. package/dist/utils/Util.js.map +1 -1
  75. package/package.json +2 -2
@@ -20,6 +20,8 @@ export declare class ApplicationCommand extends Base {
20
20
  version: string;
21
21
  constructor(data: RawApplicationCommand, client: Client);
22
22
  protected patch(data: RawApplicationCommand): void;
23
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
24
+ delete(): void;
23
25
  /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
24
26
  edit(options: {
25
27
  name?: string;
@@ -61,14 +63,12 @@ export declare class ApplicationCommand extends Base {
61
63
  dmPermission?: boolean;
62
64
  nsfw?: boolean;
63
65
  }): Promise<ApplicationCommand>;
64
- /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
65
- delete(): void;
66
- /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
67
- getPermissions(): Promise<JSONGuildApplicationCommandPermissions>;
68
66
  /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
69
67
  editPermissions(options: {
70
68
  permissions: Array<JSONApplicationCommandPermission>;
71
69
  }): Promise<JSONGuildApplicationCommandPermissions>;
70
+ /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
71
+ getPermissions(): Promise<JSONGuildApplicationCommandPermissions>;
72
72
  toRaw(): RawApplicationCommand;
73
73
  toJSON(): JSONApplicationCommand;
74
74
  }
@@ -47,6 +47,12 @@ class ApplicationCommand extends _1.Base {
47
47
  if (data.nsfw !== undefined)
48
48
  this.nsfw = data.nsfw;
49
49
  }
50
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
51
+ delete() {
52
+ this.guildId !== undefined
53
+ ? this.client.rest.delete(rest_1.Endpoints.applicationGuildCommand(this.applicationId, this.guildId, this.id))
54
+ : this.client.rest.delete(rest_1.Endpoints.applicationCommand(this.applicationId, this.id));
55
+ }
50
56
  /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
51
57
  async edit(options) {
52
58
  return new ApplicationCommand(this.guildId !== undefined
@@ -57,18 +63,16 @@ class ApplicationCommand extends _1.Base {
57
63
  json: this.client.util.applicationCommandToRaw(options),
58
64
  }), this.client);
59
65
  }
60
- /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
61
- delete() {
62
- this.guildId !== undefined
63
- ? this.client.rest.delete(rest_1.Endpoints.applicationGuildCommand(this.applicationId, this.guildId, this.id))
64
- : this.client.rest.delete(rest_1.Endpoints.applicationCommand(this.applicationId, this.id));
65
- }
66
- /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
67
- async getPermissions() {
66
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
67
+ async editPermissions(options) {
68
68
  if (!this.guildId)
69
- throw new Error("[disgroove] Can't get the permissions of a global application command");
69
+ throw new Error("[disgroove] Cannot edit the permissions of a global application command");
70
70
  return this.client.rest
71
- .get(rest_1.Endpoints.applicationCommandPermissions(this.applicationId, this.guildId, this.id))
71
+ .put(rest_1.Endpoints.applicationCommandPermissions(this.applicationId, this.guildId, this.id), {
72
+ json: {
73
+ permissions: options.permissions,
74
+ },
75
+ })
72
76
  .then((response) => ({
73
77
  id: response.id,
74
78
  applicationId: response.application_id,
@@ -80,16 +84,12 @@ class ApplicationCommand extends _1.Base {
80
84
  })),
81
85
  }));
82
86
  }
83
- /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
84
- async editPermissions(options) {
87
+ /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
88
+ async getPermissions() {
85
89
  if (!this.guildId)
86
- throw new Error("[disgroove] Can't edit the permissions of a global application command");
90
+ throw new Error("[disgroove] Cannot get the permissions of a global application command");
87
91
  return this.client.rest
88
- .put(rest_1.Endpoints.applicationCommandPermissions(this.applicationId, this.guildId, this.id), {
89
- json: {
90
- permissions: options.permissions,
91
- },
92
- })
92
+ .get(rest_1.Endpoints.applicationCommandPermissions(this.applicationId, this.guildId, this.id))
93
93
  .then((response) => ({
94
94
  id: response.id,
95
95
  applicationId: response.application_id,
@@ -106,7 +106,7 @@ class ApplicationCommand extends _1.Base {
106
106
  }
107
107
  toJSON() {
108
108
  return {
109
- id: this.id,
109
+ ...super.toJSON(),
110
110
  type: this.type,
111
111
  applicationId: this.applicationId,
112
112
  guildId: this.guildId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IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;IACJ,CAAC;CACF;AAzMD,gDAyMC"}
@@ -16,6 +16,8 @@ export declare class AutoModerationRule extends Base {
16
16
  exemptRoles: Array<string>;
17
17
  exemptChannels: Array<string>;
18
18
  constructor(data: RawAutoModerationRule, client: Client);
19
+ /** https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule */
20
+ delete(reason?: string): void;
19
21
  /** https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule */
20
22
  edit(options: {
21
23
  name?: string;
@@ -27,8 +29,6 @@ export declare class AutoModerationRule extends Base {
27
29
  exemptRoles?: Array<string>;
28
30
  exemptChannels?: Array<string>;
29
31
  }, reason?: string): Promise<AutoModerationRule>;
30
- /** https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule */
31
- delete(reason?: string): void;
32
32
  toRaw(): RawAutoModerationRule;
33
33
  toJSON(): JSONAutoModerationRule;
34
34
  }
@@ -44,6 +44,12 @@ class AutoModerationRule extends _1.Base {
44
44
  this.exemptRoles = data.exempt_roles;
45
45
  this.exemptChannels = data.exempt_channels;
46
46
  }
47
+ /** https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule */
48
+ delete(reason) {
49
+ this.client.rest.delete(rest_1.Endpoints.guildAutoModerationRule(this.guildId, this.id), {
50
+ reason,
51
+ });
52
+ }
47
53
  /** https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule */
48
54
  async edit(options, reason) {
49
55
  return new AutoModerationRule(await this.client.rest.patch(rest_1.Endpoints.guildAutoModerationRule(this.guildId, this.id), {
@@ -67,18 +73,12 @@ class AutoModerationRule extends _1.Base {
67
73
  reason,
68
74
  }), this.client);
69
75
  }
70
- /** https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule */
71
- delete(reason) {
72
- this.client.rest.delete(rest_1.Endpoints.guildAutoModerationRule(this.guildId, this.id), {
73
- reason,
74
- });
75
- }
76
76
  toRaw() {
77
77
  return this.raw;
78
78
  }
79
79
  toJSON() {
80
80
  return {
81
- id: this.id,
81
+ ...super.toJSON(),
82
82
  guildId: this.guildId,
83
83
  name: this.name,
84
84
  creatorId: this.creatorId,
@@ -1 +1 @@
1
- {"version":3,"file":"AutoModerationRule.js","sourceRoot":"","sources":["../../src/structures/AutoModerationRule.ts"],"names":[],"mappings":";;;AACA,kCAAoC;AAOpC,wBAAyB;AAGzB,oEAAoE;AACpE,MAAa,kBAAmB,SAAQ,OAAI;IACvB,GAAG,CAAwB;IAC9C,OAAO,CAAS;IAChB,IAAI,CAAS;IACb,SAAS,CAAS;IAClB,SAAS,CAAa;IACtB,WAAW,CAAS;IACpB,eAAe,CAAsB;IACrC,OAAO,CAAkC;IACzC,OAAO,CAAU;IACjB,WAAW,CAAgB;IAC3B,cAAc,CAAgB;IAE9B,YAAY,IAA2B,EAAE,MAAc;QACrD,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAEvB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;QACrC,IAAI,CAAC,eAAe,GAAG;YACrB,aAAa,EAAE,IAAI,CAAC,gBAAgB,CAAC,cAAc;YACnD,aAAa,EAAE,IAAI,CAAC,gBAAgB,CAAC,cAAc;YACnD,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO;YACtC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU;YAC3C,iBAAiB,EAAE,IAAI,CAAC,gBA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,QAAQ,CAAC,eAAe;wBAChD,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC,aAAa;qBAC7C;iBACF,CAAC,CAAC;gBACH,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,YAAY,EAAE,OAAO,CAAC,WAAW;gBACjC,eAAe,EAAE,OAAO,CAAC,cAAc;aACxC;YACD,MAAM;SACP,CACF,EACD,IAAI,CAAC,MAAM,CACZ,CAAC;IACJ,CAAC;IAED,gGAAgG;IAChG,MAAM,CAAC,MAAe;QACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CACrB,gBAAS,CAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,EACxD;YACE,MAAM;SACP,CACF,CAAC;IACJ,CAAC;IAEQ,KAAK;QACZ,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC;IACJ,CAAC;CACF;AAlHD,gDAkHC"}
1
+ {"version":3,"file":"AutoModerationRule.js","sourceRoot":"","sources":["../../src/structures/AutoModerationRule.ts"],"names":[],"mappings":";;;AACA,kCAAoC;AAOpC,wBAAyB;AAGzB,oEAAoE;AACpE,MAAa,kBAAmB,SAAQ,OAAI;IACvB,GAAG,CAAwB;IAC9C,OAAO,CAAS;IAChB,IA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,EAAE,OAAO,CAAC,cAAc;aACxC;YACD,MAAM;SACP,CACF,EACD,IAAI,CAAC,MAAM,CACZ,CAAC;IACJ,CAAC;IAEQ,KAAK;QACZ,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC;IACJ,CAAC;CACF;AAlHD,gDAkHC"}
@@ -49,6 +49,90 @@ export declare class Channel extends Base {
49
49
  protected patch(data: RawChannel & {
50
50
  newly_created?: boolean;
51
51
  }): void;
52
+ /** https://discord.com/developers/docs/resources/channel#group-dm-add-recipient */
53
+ addRecipient(userId: string, options: {
54
+ accessToken: string;
55
+ nick: string;
56
+ }): void;
57
+ /** https://discord.com/developers/docs/resources/channel#add-thread-member */
58
+ addThreadMember(userId: string): void;
59
+ /** https://discord.com/developers/docs/resources/channel#bulk-delete-messages */
60
+ bulkDeleteMessages(options?: {
61
+ messagesIds?: Array<string>;
62
+ }, reason?: string): void;
63
+ /** https://discord.com/developers/docs/resources/channel#create-channel-invite */
64
+ createInvite(options: {
65
+ maxAge?: number;
66
+ maxUses?: number;
67
+ temporary?: boolean;
68
+ unique?: boolean;
69
+ targetType?: InviteTargetTypes;
70
+ targetUserId?: string;
71
+ targetApplicationId?: string;
72
+ }, reason?: string): Promise<Invite>;
73
+ /** https://discord.com/developers/docs/resources/channel#create-message */
74
+ createMessage(options: {
75
+ content?: string;
76
+ nonce?: string | number;
77
+ tts?: boolean;
78
+ embeds?: Array<JSONEmbed>;
79
+ allowedMentions?: JSONAllowedMentions;
80
+ messageReference?: JSONMessageReference;
81
+ components?: Array<JSONActionRow>;
82
+ stickersIds?: Array<string>;
83
+ files?: Array<File>;
84
+ attachments?: Array<JSONAttachment>;
85
+ flags?: MessageFlags;
86
+ }): Promise<Message>;
87
+ /** https://discord.com/developers/docs/resources/channel#create-reaction */
88
+ createReaction(messageId: string, emoji: string): void;
89
+ /** https://discord.com/developers/docs/resources/channel#start-thread-from-message */
90
+ createThreadFromMessage(messageId: string, options: {
91
+ name: string;
92
+ autoArchiveDuration?: number;
93
+ rateLimitPerUser?: number | null;
94
+ }, reason?: string): Promise<Channel>;
95
+ /** https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel */
96
+ createThreadInForumOrMediaChannel(options: {
97
+ name: string;
98
+ autoArchiveDuration?: number;
99
+ rateLimitPerUser?: number | null;
100
+ message: {
101
+ content?: string | null;
102
+ embeds?: Array<JSONEmbed> | null;
103
+ allowedMentions?: JSONAllowedMentions | null;
104
+ components?: Array<JSONActionRow> | null;
105
+ attachments?: Array<JSONAttachment> | null;
106
+ flags?: MessageFlags | null;
107
+ };
108
+ appliedTags?: Array<string>;
109
+ files?: Array<File> | null;
110
+ }, reason?: string): Promise<Channel>;
111
+ /** https://discord.com/developers/docs/resources/channel#start-thread-without-message */
112
+ createThreadWithoutMessage(options: {
113
+ name: string;
114
+ autoArchiveDuration?: number;
115
+ type?: ChannelTypes;
116
+ invitable?: boolean;
117
+ rateLimitPerUser?: number | null;
118
+ }, reason?: string): Promise<Channel>;
119
+ /** https://discord.com/developers/docs/resources/webhook#create-webhook */
120
+ createWebhook(options: {
121
+ name: string;
122
+ avatar?: string | null;
123
+ }, reason?: string): Promise<Webhook>;
124
+ /** https://discord.com/developers/docs/resources/channel#crosspost-message */
125
+ crosspostMessage(messageId: string): Promise<Message>;
126
+ /** https://discord.com/developers/docs/resources/channel#deleteclose-channel */
127
+ delete(reason?: string): Promise<JSONChannel>;
128
+ /** https://discord.com/developers/docs/resources/channel#delete-all-reactions */
129
+ deleteAllReactions(messageId: string, emoji?: string): void;
130
+ /** https://discord.com/developers/docs/resources/channel#delete-message */
131
+ deleteMessage(messageId: string, reason?: string): void;
132
+ /** https://discord.com/developers/docs/resources/channel#delete-channel-permission */
133
+ deletePermission(overwriteId: string, reason?: string): void;
134
+ /** https://discord.com/developers/docs/resources/channel#delete-user-reaction */
135
+ deleteReaction(messageId: string, emoji: string, userId?: string): void;
52
136
  /** https://discord.com/developers/docs/resources/channel#modify-channel */
53
137
  edit(options: {
54
138
  name?: string | null;
@@ -77,44 +161,6 @@ export declare class Channel extends Base {
77
161
  invitable?: boolean;
78
162
  appliedTags?: Array<string>;
79
163
  }, reason?: string): Promise<Channel>;
80
- /** https://discord.com/developers/docs/resources/channel#deleteclose-channel */
81
- delete(reason?: string): Promise<JSONChannel>;
82
- /** https://discord.com/developers/docs/resources/channel#get-channel-messages */
83
- getMessages(options: {
84
- around?: string;
85
- before?: string;
86
- after?: string;
87
- limit?: number;
88
- }): Promise<Array<Message>>;
89
- /** https://discord.com/developers/docs/resources/channel#get-channel-message */
90
- getMessage(messageId: string): Promise<Message>;
91
- /** https://discord.com/developers/docs/resources/channel#create-message */
92
- createMessage(options: {
93
- content?: string;
94
- nonce?: string | number;
95
- tts?: boolean;
96
- embeds?: Array<JSONEmbed>;
97
- allowedMentions?: JSONAllowedMentions;
98
- messageReference?: JSONMessageReference;
99
- components?: Array<JSONActionRow>;
100
- stickersIds?: Array<string>;
101
- files?: Array<File>;
102
- attachments?: Array<JSONAttachment>;
103
- flags?: MessageFlags;
104
- }): Promise<Message>;
105
- /** https://discord.com/developers/docs/resources/channel#crosspost-message */
106
- crosspostMessage(messageId: string): Promise<Message>;
107
- /** https://discord.com/developers/docs/resources/channel#create-reaction */
108
- createReaction(messageId: string, emoji: string): void;
109
- /** https://discord.com/developers/docs/resources/channel#delete-user-reaction */
110
- deleteReaction(messageId: string, emoji: string, userId?: string): void;
111
- /** https://discord.com/developers/docs/resources/channel#get-reactions */
112
- getReactions(messageId: string, emoji: string, options?: {
113
- after?: string;
114
- limit?: number;
115
- }): Promise<Array<User>>;
116
- /** https://discord.com/developers/docs/resources/channel#delete-all-reactions */
117
- deleteAllReactions(messageId: string, emoji?: string): void;
118
164
  /** https://discord.com/developers/docs/resources/channel#edit-message */
119
165
  editMessage(messageId: string, options: {
120
166
  content?: string | null;
@@ -125,99 +171,16 @@ export declare class Channel extends Base {
125
171
  files?: Array<File> | null;
126
172
  attachments?: Array<JSONAttachment> | null;
127
173
  }): Promise<Message>;
128
- /** https://discord.com/developers/docs/resources/channel#delete-message */
129
- deleteMessage(messageId: string, reason?: string): void;
130
- /** https://discord.com/developers/docs/resources/channel#bulk-delete-messages */
131
- bulkDeleteMessages(options?: {
132
- messagesIds?: Array<string>;
133
- }, reason?: string): void;
134
174
  /** https://discord.com/developers/docs/resources/channel#edit-channel-permissions */
135
175
  editPermissions(overwriteId: string, options: {
136
176
  allow?: string | null;
137
177
  deny?: string | null;
138
178
  type: number;
139
179
  }, reason?: string): void;
140
- /** https://discord.com/developers/docs/resources/channel#get-channel-invites */
141
- getInvites(): Promise<Array<Invite>>;
142
- /** https://discord.com/developers/docs/resources/channel#create-channel-invite */
143
- createInvite(options: {
144
- maxAge?: number;
145
- maxUses?: number;
146
- temporary?: boolean;
147
- unique?: boolean;
148
- targetType?: InviteTargetTypes;
149
- targetUserId?: string;
150
- targetApplicationId?: string;
151
- }, reason?: string): Promise<Invite>;
152
- /** https://discord.com/developers/docs/resources/channel#delete-channel-permission */
153
- deletePermission(overwriteId: string, reason?: string): void;
154
180
  /** https://discord.com/developers/docs/resources/channel#follow-announcement-channel */
155
181
  follow(options: {
156
182
  webhookChannelId: string;
157
183
  }): Promise<JSONFollowedChannel>;
158
- /** https://discord.com/developers/docs/resources/channel#trigger-typing-indicator */
159
- triggerTypingIndicator(): void;
160
- /** https://discord.com/developers/docs/resources/channel#get-pinned-messages */
161
- getPinnedMessages(): Promise<Array<Message>>;
162
- /** https://discord.com/developers/docs/resources/channel#pin-message */
163
- pinMessage(messageId: string, reason?: string): void;
164
- /** https://discord.com/developers/docs/resources/channel#unpin-message */
165
- unpinMessage(messageId: string, reason?: string): void;
166
- /** https://discord.com/developers/docs/resources/channel#group-dm-add-recipient */
167
- addRecipient(userId: string, options: {
168
- accessToken: string;
169
- nick: string;
170
- }): void;
171
- /** https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient */
172
- removeRecipient(userId: string): void;
173
- /** https://discord.com/developers/docs/resources/channel#start-thread-from-message */
174
- startThreadFromMessage(messageId: string, options: {
175
- name: string;
176
- autoArchiveDuration?: number;
177
- rateLimitPerUser?: number | null;
178
- }, reason?: string): Promise<Channel>;
179
- /** https://discord.com/developers/docs/resources/channel#start-thread-without-message */
180
- startThreadWithoutMessage(options: {
181
- name: string;
182
- autoArchiveDuration?: number;
183
- type?: ChannelTypes;
184
- invitable?: boolean;
185
- rateLimitPerUser?: number | null;
186
- }, reason?: string): Promise<Channel>;
187
- /** https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel */
188
- startThreadInForumChannel(options: {
189
- name: string;
190
- autoArchiveDuration?: number;
191
- rateLimitPerUser?: number | null;
192
- message: {
193
- content?: string | null;
194
- embeds?: Array<JSONEmbed> | null;
195
- allowedMentions?: JSONAllowedMentions | null;
196
- components?: Array<JSONActionRow> | null;
197
- attachments?: Array<JSONAttachment> | null;
198
- flags?: MessageFlags | null;
199
- };
200
- appliedTags?: Array<string>;
201
- files?: Array<File> | null;
202
- }, reason?: string): Promise<Channel>;
203
- /** https://discord.com/developers/docs/resources/channel#join-thread */
204
- joinThread(): void;
205
- /** https://discord.com/developers/docs/resources/channel#add-thread-member */
206
- addThreadMember(userId: string): void;
207
- /** https://discord.com/developers/docs/resources/channel#leave-thread */
208
- leaveThread(): void;
209
- /** https://discord.com/developers/docs/resources/channel#remove-thread-member */
210
- removeThreadMember(userId: string): void;
211
- /** https://discord.com/developers/docs/resources/channel#get-thread-member */
212
- getThreadMember(userId: string, options?: {
213
- withMember?: boolean;
214
- }): Promise<JSONThreadMember>;
215
- /** https://discord.com/developers/docs/resources/channel#list-thread-members */
216
- getThreadMembers(options?: {
217
- withMember?: boolean;
218
- after?: string;
219
- limit?: number;
220
- }): Promise<Array<JSONThreadMember>>;
221
184
  /** https://discord.com/developers/docs/resources/channel#list-public-archived-threads */
222
185
  getArchivedThreads(archivedStatus: "public" | "private", options?: {
223
186
  before?: string;
@@ -227,6 +190,8 @@ export declare class Channel extends Base {
227
190
  members: Array<JSONThreadMember>;
228
191
  hasMore: boolean;
229
192
  }>;
193
+ /** https://discord.com/developers/docs/resources/channel#get-channel-invites */
194
+ getInvites(): Promise<Array<Invite>>;
230
195
  /** https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads */
231
196
  getJoinedPrivateArchivedThreads(options?: {
232
197
  before?: string;
@@ -236,13 +201,48 @@ export declare class Channel extends Base {
236
201
  members: Array<JSONThreadMember>;
237
202
  hasMore: boolean;
238
203
  }>;
239
- /** https://discord.com/developers/docs/resources/webhook#create-webhook */
240
- createWebhook(options: {
241
- name: string;
242
- avatar?: string | null;
243
- }, reason?: string): Promise<Webhook>;
204
+ /** https://discord.com/developers/docs/resources/channel#get-channel-message */
205
+ getMessage(messageId: string): Promise<Message>;
206
+ /** https://discord.com/developers/docs/resources/channel#get-channel-messages */
207
+ getMessages(options: {
208
+ around?: string;
209
+ before?: string;
210
+ after?: string;
211
+ limit?: number;
212
+ }): Promise<Array<Message>>;
213
+ /** https://discord.com/developers/docs/resources/channel#get-pinned-messages */
214
+ getPinnedMessages(): Promise<Array<Message>>;
215
+ /** https://discord.com/developers/docs/resources/channel#get-reactions */
216
+ getReactions(messageId: string, emoji: string, options?: {
217
+ after?: string;
218
+ limit?: number;
219
+ }): Promise<Array<User>>;
220
+ /** https://discord.com/developers/docs/resources/channel#get-thread-member */
221
+ getThreadMember(userId: string, options?: {
222
+ withMember?: boolean;
223
+ }): Promise<JSONThreadMember>;
224
+ /** https://discord.com/developers/docs/resources/channel#list-thread-members */
225
+ getThreadMembers(options?: {
226
+ withMember?: boolean;
227
+ after?: string;
228
+ limit?: number;
229
+ }): Promise<Array<JSONThreadMember>>;
244
230
  /** https://discord.com/developers/docs/resources/webhook#get-channel-webhooks */
245
231
  getWebhooks(): Promise<Array<Webhook>>;
232
+ /** https://discord.com/developers/docs/resources/channel#join-thread */
233
+ joinThread(): void;
234
+ /** https://discord.com/developers/docs/resources/channel#leave-thread */
235
+ leaveThread(): void;
236
+ /** https://discord.com/developers/docs/resources/channel#pin-message */
237
+ pinMessage(messageId: string, reason?: string): void;
238
+ /** https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient */
239
+ removeRecipient(userId: string): void;
240
+ /** https://discord.com/developers/docs/resources/channel#remove-thread-member */
241
+ removeThreadMember(userId: string): void;
242
+ /** https://discord.com/developers/docs/resources/channel#trigger-typing-indicator */
243
+ triggerTypingIndicator(): void;
244
+ /** https://discord.com/developers/docs/resources/channel#unpin-message */
245
+ unpinMessage(messageId: string, reason?: string): void;
246
246
  toRaw(): RawChannel & {
247
247
  newly_created?: boolean;
248
248
  };