seyfert 2.0.0 → 2.1.1-dev-11310514874.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.
- package/lib/api/Router.d.ts +2 -2
- package/lib/api/Router.js +2 -1
- package/lib/api/Routes/applications.d.ts +29 -30
- package/lib/api/Routes/cdn.d.ts +6 -1
- package/lib/api/Routes/channels.d.ts +44 -45
- package/lib/api/Routes/gateway.d.ts +3 -4
- package/lib/api/Routes/guilds.d.ts +81 -80
- package/lib/api/Routes/index.d.ts +3 -1
- package/lib/api/Routes/interactions.d.ts +9 -3
- package/lib/api/Routes/invites.d.ts +3 -4
- package/lib/api/Routes/skus.d.ts +10 -0
- package/lib/api/Routes/skus.js +2 -0
- package/lib/api/Routes/soundboard.d.ts +23 -0
- package/lib/api/Routes/soundboard.js +2 -0
- package/lib/api/Routes/stage-instances.d.ts +5 -6
- package/lib/api/Routes/stickers.d.ts +3 -4
- package/lib/api/Routes/users.d.ts +11 -12
- package/lib/api/Routes/voice.d.ts +2 -3
- package/lib/api/Routes/webhooks.d.ts +16 -15
- package/lib/api/api.d.ts +17 -11
- package/lib/api/api.js +26 -22
- package/lib/api/shared.d.ts +2 -2
- package/lib/api/utils/constants.d.ts +3 -1
- package/lib/api/utils/constants.js +3 -2
- package/lib/builders/ActionRow.d.ts +1 -1
- package/lib/builders/Attachment.d.ts +3 -3
- package/lib/builders/Attachment.js +13 -13
- package/lib/builders/Button.d.ts +1 -1
- package/lib/builders/Button.js +1 -1
- package/lib/builders/Embed.d.ts +1 -1
- package/lib/builders/Embed.js +2 -2
- package/lib/builders/Modal.d.ts +1 -1
- package/lib/builders/Poll.d.ts +1 -1
- package/lib/builders/Poll.js +1 -1
- package/lib/builders/SelectMenu.d.ts +1 -1
- package/lib/builders/SelectMenu.js +1 -1
- package/lib/builders/types.d.ts +2 -1
- package/lib/cache/adapters/default.js +5 -3
- package/lib/cache/adapters/limited.d.ts +1 -2
- package/lib/cache/adapters/limited.js +34 -30
- package/lib/cache/adapters/workeradapter.js +3 -1
- package/lib/cache/index.d.ts +12 -12
- package/lib/cache/index.js +48 -39
- package/lib/cache/resources/bans.d.ts +2 -2
- package/lib/cache/resources/bans.js +1 -1
- package/lib/cache/resources/channels.d.ts +1 -1
- package/lib/cache/resources/default/guild-related.d.ts +1 -2
- package/lib/cache/resources/emojis.d.ts +2 -2
- package/lib/cache/resources/emojis.js +1 -1
- package/lib/cache/resources/guilds.d.ts +2 -2
- package/lib/cache/resources/guilds.js +7 -11
- package/lib/cache/resources/members.d.ts +2 -2
- package/lib/cache/resources/members.js +1 -1
- package/lib/cache/resources/messages.d.ts +2 -2
- package/lib/cache/resources/messages.js +3 -3
- package/lib/cache/resources/overwrites.d.ts +1 -1
- package/lib/cache/resources/roles.d.ts +2 -2
- package/lib/cache/resources/roles.js +1 -1
- package/lib/cache/resources/stickers.d.ts +2 -2
- package/lib/cache/resources/stickers.js +1 -1
- package/lib/cache/resources/users.d.ts +2 -2
- package/lib/cache/resources/users.js +1 -1
- package/lib/cache/resources/voice-states.d.ts +2 -2
- package/lib/cache/resources/voice-states.js +1 -1
- package/lib/client/base.d.ts +10 -15
- package/lib/client/base.js +48 -44
- package/lib/client/client.d.ts +4 -4
- package/lib/client/client.js +37 -38
- package/lib/client/collectors.js +1 -1
- package/lib/client/httpclient.d.ts +1 -1
- package/lib/client/httpclient.js +2 -2
- package/lib/client/transformers.d.ts +37 -34
- package/lib/client/transformers.js +66 -63
- package/lib/client/workerclient.d.ts +13 -13
- package/lib/client/workerclient.js +182 -65
- package/lib/collection.d.ts +3 -3
- package/lib/commands/applications/chat.d.ts +3 -3
- package/lib/commands/applications/chat.js +5 -6
- package/lib/commands/applications/chatcontext.d.ts +6 -6
- package/lib/commands/applications/chatcontext.js +16 -8
- package/lib/commands/applications/entryPoint.d.ts +46 -0
- package/lib/commands/applications/entryPoint.js +56 -0
- package/lib/commands/applications/entrycontext.d.ts +40 -0
- package/lib/commands/applications/entrycontext.js +85 -0
- package/lib/commands/applications/menu.d.ts +1 -1
- package/lib/commands/applications/menucontext.d.ts +5 -5
- package/lib/commands/applications/menucontext.js +6 -6
- package/lib/commands/applications/options.d.ts +7 -6
- package/lib/commands/applications/shared.d.ts +5 -2
- package/lib/commands/basecontext.d.ts +1 -1
- package/lib/commands/decorators.d.ts +20 -26
- package/lib/commands/decorators.js +8 -4
- package/lib/commands/handle.d.ts +13 -12
- package/lib/commands/handle.js +133 -65
- package/lib/commands/handler.d.ts +9 -7
- package/lib/commands/handler.js +27 -18
- package/lib/commands/index.d.ts +2 -0
- package/lib/commands/index.js +2 -0
- package/lib/commands/optionresolver.d.ts +4 -4
- package/lib/commands/optionresolver.js +4 -4
- package/lib/common/bot/watcher.d.ts +1 -1
- package/lib/common/it/formatter.d.ts +21 -21
- package/lib/common/it/formatter.js +40 -41
- package/lib/common/it/logger.js +1 -1
- package/lib/common/it/utils.d.ts +14 -6
- package/lib/common/it/utils.js +62 -27
- package/lib/common/shorters/application.d.ts +2 -3
- package/lib/common/shorters/application.js +3 -3
- package/lib/common/shorters/bans.js +1 -1
- package/lib/common/shorters/channels.d.ts +3 -3
- package/lib/common/shorters/channels.js +3 -3
- package/lib/common/shorters/emojis.js +4 -4
- package/lib/common/shorters/guilds.d.ts +3 -3
- package/lib/common/shorters/guilds.js +5 -9
- package/lib/common/shorters/interaction.d.ts +3 -3
- package/lib/common/shorters/interaction.js +6 -5
- package/lib/common/shorters/members.d.ts +4 -5
- package/lib/common/shorters/members.js +6 -7
- package/lib/common/shorters/messages.d.ts +1 -1
- package/lib/common/shorters/messages.js +4 -4
- package/lib/common/shorters/reactions.d.ts +1 -1
- package/lib/common/shorters/reactions.js +1 -1
- package/lib/common/shorters/roles.js +1 -1
- package/lib/common/shorters/templates.js +2 -2
- package/lib/common/shorters/threads.d.ts +1 -1
- package/lib/common/shorters/threads.js +17 -11
- package/lib/common/shorters/webhook.d.ts +1 -1
- package/lib/common/shorters/webhook.js +4 -4
- package/lib/common/types/options.d.ts +2 -2
- package/lib/common/types/resolvables.d.ts +1 -1
- package/lib/common/types/util.d.ts +4 -1
- package/lib/common/types/write.d.ts +3 -3
- package/lib/components/BaseComponent.js +1 -1
- package/lib/components/ButtonComponent.d.ts +1 -1
- package/lib/components/componentcommand.d.ts +1 -1
- package/lib/components/componentcontext.d.ts +4 -4
- package/lib/components/componentcontext.js +1 -1
- package/lib/components/handler.d.ts +10 -8
- package/lib/components/handler.js +16 -13
- package/lib/components/index.js +2 -1
- package/lib/components/modalcontext.d.ts +2 -2
- package/lib/components/modalcontext.js +1 -1
- package/lib/deps/mixer.d.ts +1 -1
- package/lib/deps/mixer.js +6 -1
- package/lib/events/handler.d.ts +5 -5
- package/lib/events/handler.js +69 -19
- package/lib/events/hooks/application_command.d.ts +1 -1
- package/lib/events/hooks/auto_moderation.d.ts +1 -1
- package/lib/events/hooks/auto_moderation.js +1 -1
- package/lib/events/hooks/channel.d.ts +1 -1
- package/lib/events/hooks/custom.d.ts +1 -0
- package/lib/events/hooks/custom.js +5 -1
- package/lib/events/hooks/dispatch.d.ts +1 -1
- package/lib/events/hooks/entitlement.d.ts +4 -5
- package/lib/events/hooks/entitlement.js +4 -4
- package/lib/events/hooks/guild.d.ts +3 -3
- package/lib/events/hooks/guild.js +1 -1
- package/lib/events/hooks/index.d.ts +1 -0
- package/lib/events/hooks/index.js +1 -0
- package/lib/events/hooks/integration.d.ts +1 -1
- package/lib/events/hooks/integration.js +1 -1
- package/lib/events/hooks/interactions.d.ts +3 -3
- package/lib/events/hooks/invite.d.ts +1 -1
- package/lib/events/hooks/message.d.ts +3 -3
- package/lib/events/hooks/message.js +1 -1
- package/lib/events/hooks/presence.d.ts +2 -2
- package/lib/events/hooks/soundboard.d.ts +155 -0
- package/lib/events/hooks/soundboard.js +28 -0
- package/lib/events/hooks/stage.d.ts +2 -2
- package/lib/events/hooks/subscriptions.d.ts +35 -0
- package/lib/events/hooks/subscriptions.js +16 -0
- package/lib/events/hooks/thread.d.ts +2 -2
- package/lib/events/hooks/thread.js +2 -2
- package/lib/events/hooks/typing.d.ts +1 -1
- package/lib/events/hooks/typing.js +1 -1
- package/lib/events/hooks/user.d.ts +2 -2
- package/lib/events/hooks/voice.d.ts +2 -2
- package/lib/events/hooks/voice.js +1 -1
- package/lib/events/hooks/webhook.d.ts +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +3 -5
- package/lib/langs/handler.d.ts +2 -2
- package/lib/structures/Guild.d.ts +7 -4
- package/lib/structures/Guild.js +1 -1
- package/lib/structures/GuildBan.d.ts +1 -1
- package/lib/structures/GuildMember.d.ts +7 -5
- package/lib/structures/GuildMember.js +5 -3
- package/lib/structures/GuildRole.d.ts +1 -1
- package/lib/structures/GuildTemplate.d.ts +1 -1
- package/lib/structures/Interaction.d.ts +39 -16
- package/lib/structures/Interaction.js +82 -26
- package/lib/structures/Message.d.ts +4 -10
- package/lib/structures/Message.js +5 -8
- package/lib/structures/Poll.d.ts +3 -3
- package/lib/structures/Sticker.d.ts +2 -2
- package/lib/structures/Sticker.js +1 -1
- package/lib/structures/VoiceState.d.ts +2 -1
- package/lib/structures/VoiceState.js +1 -1
- package/lib/structures/Webhook.d.ts +3 -3
- package/lib/structures/Webhook.js +1 -1
- package/lib/structures/channels.d.ts +4 -4
- package/lib/structures/channels.js +8 -7
- package/lib/structures/extra/BaseGuild.d.ts +11 -1
- package/lib/structures/extra/BaseGuild.js +27 -0
- package/lib/structures/extra/BitField.d.ts +3 -3
- package/lib/structures/extra/BitField.js +34 -33
- package/lib/structures/extra/DiscordBase.js +1 -1
- package/lib/structures/extra/Permissions.d.ts +2 -0
- package/lib/structures/extra/Permissions.js +21 -0
- package/lib/types/gateway.d.ts +71 -6
- package/lib/types/payloads/_interactions/_applicationCommands/chatInput.d.ts +6 -1
- package/lib/types/payloads/_interactions/applicationCommands.d.ts +41 -6
- package/lib/types/payloads/_interactions/applicationCommands.js +28 -1
- package/lib/types/payloads/_interactions/base.d.ts +1 -1
- package/lib/types/payloads/_interactions/responses.d.ts +74 -2
- package/lib/types/payloads/_interactions/responses.js +4 -0
- package/lib/types/payloads/channel.d.ts +46 -6
- package/lib/types/payloads/channel.js +5 -1
- package/lib/types/payloads/guild.d.ts +9 -1
- package/lib/types/payloads/guild.js +8 -0
- package/lib/types/payloads/index.d.ts +1 -0
- package/lib/types/payloads/index.js +1 -0
- package/lib/types/payloads/monetization.d.ts +29 -1
- package/lib/types/payloads/monetization.js +10 -1
- package/lib/types/payloads/soundboard.d.ts +23 -0
- package/lib/types/payloads/soundboard.js +5 -0
- package/lib/types/payloads/user.js +0 -1
- package/lib/types/rest/application.d.ts +3 -3
- package/lib/types/rest/auditLog.d.ts +1 -1
- package/lib/types/rest/channel.d.ts +5 -18
- package/lib/types/rest/guild.d.ts +2 -2
- package/lib/types/rest/guildScheduledEvent.d.ts +1 -1
- package/lib/types/rest/index.d.ts +1 -0
- package/lib/types/rest/index.js +1 -0
- package/lib/types/rest/interactions.d.ts +30 -8
- package/lib/types/rest/monetization.d.ts +22 -1
- package/lib/types/rest/oauth2.d.ts +1 -1
- package/lib/types/rest/poll.d.ts +1 -1
- package/lib/types/rest/soundboard.d.ts +64 -0
- package/lib/types/rest/soundboard.js +2 -0
- package/lib/types/rest/stageInstance.d.ts +1 -1
- package/lib/types/rest/template.d.ts +1 -1
- package/lib/types/rest/user.d.ts +1 -1
- package/lib/types/rest/webhook.d.ts +3 -3
- package/lib/types/utils/index.d.ts +27 -7
- package/lib/types/utils/index.js +25 -6
- package/lib/websocket/SharedTypes.d.ts +18 -3
- package/lib/websocket/constants/index.d.ts +3 -2
- package/lib/websocket/constants/index.js +4 -4
- package/lib/websocket/discord/basesocket.d.ts +1 -1
- package/lib/websocket/discord/shard.d.ts +4 -3
- package/lib/websocket/discord/shard.js +47 -24
- package/lib/websocket/discord/sharder.d.ts +9 -6
- package/lib/websocket/discord/sharder.js +92 -17
- package/lib/websocket/discord/shared.d.ts +12 -3
- package/lib/websocket/discord/socket/custom.d.ts +1 -1
- package/lib/websocket/discord/socket/custom.js +70 -40
- package/lib/websocket/discord/worker.d.ts +9 -2
- package/lib/websocket/discord/workermanager.d.ts +42 -16
- package/lib/websocket/discord/workermanager.js +170 -46
- package/lib/websocket/structures/timeout.d.ts +4 -5
- package/lib/websocket/structures/timeout.js +23 -24
- package/package.json +72 -65
- package/lib/cache/resources/threads.d.ts +0 -14
- package/lib/cache/resources/threads.js +0 -32
|
@@ -59,69 +59,69 @@ type Timestamp = `<t:${number}:${TimestampStyle}>`;
|
|
|
59
59
|
/**
|
|
60
60
|
* Represents a formatter utility for formatting content.
|
|
61
61
|
*/
|
|
62
|
-
export declare
|
|
62
|
+
export declare const Formatter: {
|
|
63
63
|
/**
|
|
64
64
|
* Formats a code block.
|
|
65
65
|
* @param content The content of the code block.
|
|
66
66
|
* @param language The language of the code block. Defaults to 'txt'.
|
|
67
67
|
* @returns The formatted code block.
|
|
68
68
|
*/
|
|
69
|
-
|
|
69
|
+
codeBlock(content: string, language?: string): string;
|
|
70
70
|
/**
|
|
71
71
|
* Formats content into inline code.
|
|
72
72
|
* @param content The content to format.
|
|
73
73
|
* @returns The formatted content.
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
inlineCode(content: string): `\`${string}\``;
|
|
76
76
|
/**
|
|
77
77
|
* Formats content into bold text.
|
|
78
78
|
* @param content The content to format.
|
|
79
79
|
* @returns The formatted content.
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
bold(content: string): `**${string}**`;
|
|
82
82
|
/**
|
|
83
83
|
* Formats content into italic text.
|
|
84
84
|
* @param content The content to format.
|
|
85
85
|
* @returns The formatted content.
|
|
86
86
|
*/
|
|
87
|
-
|
|
87
|
+
italic(content: string): `*${string}*`;
|
|
88
88
|
/**
|
|
89
89
|
* Formats content into underlined text.
|
|
90
90
|
* @param content The content to format.
|
|
91
91
|
* @returns The formatted content.
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
underline(content: string): `__${string}__`;
|
|
94
94
|
/**
|
|
95
95
|
* Formats content into strikethrough text.
|
|
96
96
|
* @param content The content to format.
|
|
97
97
|
* @returns The formatted content.
|
|
98
98
|
*/
|
|
99
|
-
|
|
99
|
+
strikeThrough(content: string): `~~${string}~~`;
|
|
100
100
|
/**
|
|
101
101
|
* Formats content into a hyperlink.
|
|
102
102
|
* @param content The content to format.
|
|
103
103
|
* @param url The URL to hyperlink to.
|
|
104
104
|
* @returns The formatted content.
|
|
105
105
|
*/
|
|
106
|
-
|
|
106
|
+
hyperlink(content: string, url: string): `[${string}](${string})`;
|
|
107
107
|
/**
|
|
108
108
|
* Formats content into a spoiler.
|
|
109
109
|
* @param content The content to format.
|
|
110
110
|
* @returns The formatted content.
|
|
111
111
|
*/
|
|
112
|
-
|
|
112
|
+
spoiler(content: string): `||${string}||`;
|
|
113
113
|
/**
|
|
114
114
|
* Formats content into a quote.
|
|
115
115
|
* @param content The content to format.
|
|
116
116
|
* @returns The formatted content.
|
|
117
117
|
*/
|
|
118
|
-
|
|
118
|
+
blockQuote(content: string): string;
|
|
119
119
|
/**
|
|
120
120
|
* Formats content into a quote.
|
|
121
121
|
* @param content The content to format.
|
|
122
122
|
* @returns The formatted content.
|
|
123
123
|
*/
|
|
124
|
-
|
|
124
|
+
quote(content: string): string;
|
|
125
125
|
/**
|
|
126
126
|
* Formats a message link.
|
|
127
127
|
* @param guildId The ID of the guild.
|
|
@@ -129,59 +129,59 @@ export declare class Formatter {
|
|
|
129
129
|
* @param messageId The ID of the message.
|
|
130
130
|
* @returns The formatted message link.
|
|
131
131
|
*/
|
|
132
|
-
|
|
132
|
+
messageLink(guildId: string, channelId: string, messageId: string): MessageLink;
|
|
133
133
|
/**
|
|
134
134
|
* Formats a header.
|
|
135
135
|
* @param content The content of the header.
|
|
136
136
|
* @param level The level of the header. Defaults to 1.
|
|
137
137
|
* @returns The formatted header.
|
|
138
138
|
*/
|
|
139
|
-
|
|
139
|
+
header(content: string, level?: HeadingLevel): string;
|
|
140
140
|
/**
|
|
141
141
|
* Formats a list.
|
|
142
142
|
* @param items The items of the list.
|
|
143
143
|
* @param ordered Whether the list is ordered. Defaults to false.
|
|
144
144
|
* @returns The formatted list.
|
|
145
145
|
*/
|
|
146
|
-
|
|
146
|
+
list(items: string[], ordered?: boolean): string;
|
|
147
147
|
/**
|
|
148
148
|
* Formats the given timestamp into discord unix timestamp format.
|
|
149
149
|
* @param timestamp The timestamp to format.
|
|
150
150
|
* @param style The style of the timestamp. Defaults to 't'.
|
|
151
151
|
* @returns The formatted timestamp.
|
|
152
152
|
*/
|
|
153
|
-
|
|
153
|
+
timestamp(timestamp: Date, style?: TimestampStyle): Timestamp;
|
|
154
154
|
/**
|
|
155
155
|
* Formats a user mention.
|
|
156
156
|
* @param userId The ID of the user to mention.
|
|
157
157
|
* @returns The formatted user mention.
|
|
158
158
|
*/
|
|
159
|
-
|
|
159
|
+
userMention(userId: string): `<@${string}>`;
|
|
160
160
|
/**
|
|
161
161
|
* Formats a role mention.
|
|
162
162
|
* @param roleId The ID of the role to mention.
|
|
163
163
|
* @returns The formatted role mention.
|
|
164
164
|
*/
|
|
165
|
-
|
|
165
|
+
roleMention(roleId: string): `<@&${string}>`;
|
|
166
166
|
/**
|
|
167
167
|
* Formats a channel mention.
|
|
168
168
|
* @param channelId The ID of the channel to mention.
|
|
169
169
|
* @returns The formatted channel mention.
|
|
170
170
|
*/
|
|
171
|
-
|
|
171
|
+
channelMention(channelId: string): `<#${string}>`;
|
|
172
172
|
/**
|
|
173
173
|
* Formats an emoji.
|
|
174
174
|
* @param emojiId The ID of the emoji.
|
|
175
175
|
* @param animated Whether the emoji is animated. Defaults to false.
|
|
176
176
|
* @returns The formatted emoji.
|
|
177
177
|
*/
|
|
178
|
-
|
|
178
|
+
emojiMention(emojiId: string, name: string | null, animated?: boolean): string;
|
|
179
179
|
/**
|
|
180
180
|
* Formats a channel link.
|
|
181
181
|
* @param channelId The ID of the channel.
|
|
182
182
|
* @param guildId The ID of the guild. Defaults to '@me'.
|
|
183
183
|
* @returns The formatted channel link.
|
|
184
184
|
*/
|
|
185
|
-
|
|
186
|
-
}
|
|
185
|
+
channelLink(channelId: string, guildId?: string): string;
|
|
186
|
+
};
|
|
187
187
|
export {};
|
|
@@ -56,89 +56,89 @@ var TimestampStyle;
|
|
|
56
56
|
/**
|
|
57
57
|
* Represents a formatter utility for formatting content.
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
exports.Formatter = {
|
|
60
60
|
/**
|
|
61
61
|
* Formats a code block.
|
|
62
62
|
* @param content The content of the code block.
|
|
63
63
|
* @param language The language of the code block. Defaults to 'txt'.
|
|
64
64
|
* @returns The formatted code block.
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
codeBlock(content, language = 'txt') {
|
|
67
67
|
return `\`\`\`${language}\n${content}\n\`\`\``;
|
|
68
|
-
}
|
|
68
|
+
},
|
|
69
69
|
/**
|
|
70
70
|
* Formats content into inline code.
|
|
71
71
|
* @param content The content to format.
|
|
72
72
|
* @returns The formatted content.
|
|
73
73
|
*/
|
|
74
|
-
|
|
74
|
+
inlineCode(content) {
|
|
75
75
|
return `\`${content}\``;
|
|
76
|
-
}
|
|
76
|
+
},
|
|
77
77
|
/**
|
|
78
78
|
* Formats content into bold text.
|
|
79
79
|
* @param content The content to format.
|
|
80
80
|
* @returns The formatted content.
|
|
81
81
|
*/
|
|
82
|
-
|
|
82
|
+
bold(content) {
|
|
83
83
|
return `**${content}**`;
|
|
84
|
-
}
|
|
84
|
+
},
|
|
85
85
|
/**
|
|
86
86
|
* Formats content into italic text.
|
|
87
87
|
* @param content The content to format.
|
|
88
88
|
* @returns The formatted content.
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
italic(content) {
|
|
91
91
|
return `*${content}*`;
|
|
92
|
-
}
|
|
92
|
+
},
|
|
93
93
|
/**
|
|
94
94
|
* Formats content into underlined text.
|
|
95
95
|
* @param content The content to format.
|
|
96
96
|
* @returns The formatted content.
|
|
97
97
|
*/
|
|
98
|
-
|
|
98
|
+
underline(content) {
|
|
99
99
|
return `__${content}__`;
|
|
100
|
-
}
|
|
100
|
+
},
|
|
101
101
|
/**
|
|
102
102
|
* Formats content into strikethrough text.
|
|
103
103
|
* @param content The content to format.
|
|
104
104
|
* @returns The formatted content.
|
|
105
105
|
*/
|
|
106
|
-
|
|
106
|
+
strikeThrough(content) {
|
|
107
107
|
return `~~${content}~~`;
|
|
108
|
-
}
|
|
108
|
+
},
|
|
109
109
|
/**
|
|
110
110
|
* Formats content into a hyperlink.
|
|
111
111
|
* @param content The content to format.
|
|
112
112
|
* @param url The URL to hyperlink to.
|
|
113
113
|
* @returns The formatted content.
|
|
114
114
|
*/
|
|
115
|
-
|
|
115
|
+
hyperlink(content, url) {
|
|
116
116
|
return `[${content}](${url})`;
|
|
117
|
-
}
|
|
117
|
+
},
|
|
118
118
|
/**
|
|
119
119
|
* Formats content into a spoiler.
|
|
120
120
|
* @param content The content to format.
|
|
121
121
|
* @returns The formatted content.
|
|
122
122
|
*/
|
|
123
|
-
|
|
123
|
+
spoiler(content) {
|
|
124
124
|
return `||${content}||`;
|
|
125
|
-
}
|
|
125
|
+
},
|
|
126
126
|
/**
|
|
127
127
|
* Formats content into a quote.
|
|
128
128
|
* @param content The content to format.
|
|
129
129
|
* @returns The formatted content.
|
|
130
130
|
*/
|
|
131
|
-
|
|
131
|
+
blockQuote(content) {
|
|
132
132
|
return `>>> ${content}`;
|
|
133
|
-
}
|
|
133
|
+
},
|
|
134
134
|
/**
|
|
135
135
|
* Formats content into a quote.
|
|
136
136
|
* @param content The content to format.
|
|
137
137
|
* @returns The formatted content.
|
|
138
138
|
*/
|
|
139
|
-
|
|
139
|
+
quote(content) {
|
|
140
140
|
return `> ${content}`;
|
|
141
|
-
}
|
|
141
|
+
},
|
|
142
142
|
/**
|
|
143
143
|
* Formats a message link.
|
|
144
144
|
* @param guildId The ID of the guild.
|
|
@@ -146,81 +146,80 @@ class Formatter {
|
|
|
146
146
|
* @param messageId The ID of the message.
|
|
147
147
|
* @returns The formatted message link.
|
|
148
148
|
*/
|
|
149
|
-
|
|
149
|
+
messageLink(guildId, channelId, messageId) {
|
|
150
150
|
return `https://discord.com/channels/${guildId}/${channelId}/${messageId}`;
|
|
151
|
-
}
|
|
151
|
+
},
|
|
152
152
|
/**
|
|
153
153
|
* Formats a header.
|
|
154
154
|
* @param content The content of the header.
|
|
155
155
|
* @param level The level of the header. Defaults to 1.
|
|
156
156
|
* @returns The formatted header.
|
|
157
157
|
*/
|
|
158
|
-
|
|
158
|
+
header(content, level = HeadingLevel.H1) {
|
|
159
159
|
return `${'#'.repeat(level)} ${content}`;
|
|
160
|
-
}
|
|
160
|
+
},
|
|
161
161
|
/**
|
|
162
162
|
* Formats a list.
|
|
163
163
|
* @param items The items of the list.
|
|
164
164
|
* @param ordered Whether the list is ordered. Defaults to false.
|
|
165
165
|
* @returns The formatted list.
|
|
166
166
|
*/
|
|
167
|
-
|
|
167
|
+
list(items, ordered = false) {
|
|
168
168
|
return items
|
|
169
169
|
.map((item, index) => {
|
|
170
170
|
return (ordered ? `${index + 1}. ` : '- ') + item;
|
|
171
171
|
})
|
|
172
172
|
.join('\n');
|
|
173
|
-
}
|
|
173
|
+
},
|
|
174
174
|
/**
|
|
175
175
|
* Formats the given timestamp into discord unix timestamp format.
|
|
176
176
|
* @param timestamp The timestamp to format.
|
|
177
177
|
* @param style The style of the timestamp. Defaults to 't'.
|
|
178
178
|
* @returns The formatted timestamp.
|
|
179
179
|
*/
|
|
180
|
-
|
|
180
|
+
timestamp(timestamp, style = TimestampStyle.RelativeTime) {
|
|
181
181
|
return `<t:${Math.floor(timestamp.getTime() / 1000)}:${style}>`;
|
|
182
|
-
}
|
|
182
|
+
},
|
|
183
183
|
/**
|
|
184
184
|
* Formats a user mention.
|
|
185
185
|
* @param userId The ID of the user to mention.
|
|
186
186
|
* @returns The formatted user mention.
|
|
187
187
|
*/
|
|
188
|
-
|
|
188
|
+
userMention(userId) {
|
|
189
189
|
return `<@${userId}>`;
|
|
190
|
-
}
|
|
190
|
+
},
|
|
191
191
|
/**
|
|
192
192
|
* Formats a role mention.
|
|
193
193
|
* @param roleId The ID of the role to mention.
|
|
194
194
|
* @returns The formatted role mention.
|
|
195
195
|
*/
|
|
196
|
-
|
|
196
|
+
roleMention(roleId) {
|
|
197
197
|
return `<@&${roleId}>`;
|
|
198
|
-
}
|
|
198
|
+
},
|
|
199
199
|
/**
|
|
200
200
|
* Formats a channel mention.
|
|
201
201
|
* @param channelId The ID of the channel to mention.
|
|
202
202
|
* @returns The formatted channel mention.
|
|
203
203
|
*/
|
|
204
|
-
|
|
204
|
+
channelMention(channelId) {
|
|
205
205
|
return `<#${channelId}>`;
|
|
206
|
-
}
|
|
206
|
+
},
|
|
207
207
|
/**
|
|
208
208
|
* Formats an emoji.
|
|
209
209
|
* @param emojiId The ID of the emoji.
|
|
210
210
|
* @param animated Whether the emoji is animated. Defaults to false.
|
|
211
211
|
* @returns The formatted emoji.
|
|
212
212
|
*/
|
|
213
|
-
|
|
213
|
+
emojiMention(emojiId, name, animated = false) {
|
|
214
214
|
return `<${animated ? 'a' : ''}:${name ?? '_'}:${emojiId}>`;
|
|
215
|
-
}
|
|
215
|
+
},
|
|
216
216
|
/**
|
|
217
217
|
* Formats a channel link.
|
|
218
218
|
* @param channelId The ID of the channel.
|
|
219
219
|
* @param guildId The ID of the guild. Defaults to '@me'.
|
|
220
220
|
* @returns The formatted channel link.
|
|
221
221
|
*/
|
|
222
|
-
|
|
222
|
+
channelLink(channelId, guildId) {
|
|
223
223
|
return `https://discord.com/channels/${guildId ?? '@me'}/${channelId}`;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
exports.Formatter = Formatter;
|
|
224
|
+
},
|
|
225
|
+
};
|
package/lib/common/it/logger.js
CHANGED
|
@@ -44,7 +44,7 @@ class Logger {
|
|
|
44
44
|
for (const i of await node_fs_1.promises.readdir((0, node_path_1.join)(process.cwd(), Logger.dirname), { withFileTypes: true })) {
|
|
45
45
|
if (Logger.streams[i.name])
|
|
46
46
|
await new Promise(res => Logger.streams[i.name].close(res));
|
|
47
|
-
await node_fs_1.promises.unlink((0, node_path_1.join)(process.cwd(), Logger.dirname, i.name)).catch(() =>
|
|
47
|
+
await node_fs_1.promises.unlink((0, node_path_1.join)(process.cwd(), Logger.dirname, i.name)).catch(() => undefined);
|
|
48
48
|
delete Logger.streams[i.name];
|
|
49
49
|
}
|
|
50
50
|
}
|
package/lib/common/it/utils.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
3
|
-
import type
|
|
1
|
+
import { type ColorResolvable, type EmojiResolvable, type Logger, type ObjectToLower, type ObjectToSnake, type TypeArray } from '..';
|
|
2
|
+
import type { Cache } from '../../cache';
|
|
3
|
+
import { type APIPartialEmoji, GatewayIntentBits } from '../../types';
|
|
4
|
+
/**
|
|
5
|
+
* Calculates the shard ID for a guild based on its ID.
|
|
6
|
+
* @param guildId The ID of the guild.
|
|
7
|
+
* @param shards The number of shards to calculate the ID for.
|
|
8
|
+
* @returns The shard ID.
|
|
9
|
+
*/
|
|
10
|
+
export declare function calculateShardId(guildId: string, shards?: number): number;
|
|
4
11
|
/**
|
|
5
12
|
* Resolves the color to a numeric representation.
|
|
6
13
|
* @param color The color to resolve.
|
|
@@ -33,9 +40,9 @@ export declare function MergeOptions<T>(defaults: any, ...options: any[]): T;
|
|
|
33
40
|
* @param func The predicate function used to test elements of the array.
|
|
34
41
|
* @returns An object containing two arrays: one with elements that passed the test and one with elements that did not.
|
|
35
42
|
*/
|
|
36
|
-
export declare function filterSplit<Element,
|
|
43
|
+
export declare function filterSplit<Element, Never = Element>(arr: (Element | Never)[], func: (value: Element | Never) => boolean): {
|
|
37
44
|
expect: Element[];
|
|
38
|
-
never:
|
|
45
|
+
never: Never[];
|
|
39
46
|
};
|
|
40
47
|
/**
|
|
41
48
|
* Represents a base handler class.
|
|
@@ -52,7 +59,7 @@ export declare class BaseHandler {
|
|
|
52
59
|
* @param path The path to filter.
|
|
53
60
|
* @returns `true` if the path passes the filter, otherwise `false`.
|
|
54
61
|
*/
|
|
55
|
-
|
|
62
|
+
filter: (path: string) => boolean;
|
|
56
63
|
/**
|
|
57
64
|
* Recursively retrieves all files in a directory.
|
|
58
65
|
* @param dir The directory path.
|
|
@@ -110,3 +117,4 @@ export declare function resolvePartialEmoji(emoji: EmojiResolvable): APIPartialE
|
|
|
110
117
|
export declare function resolveEmoji(emoji: EmojiResolvable, cache: Cache): Promise<APIPartialEmoji | undefined>;
|
|
111
118
|
export declare function encodeEmoji(rawEmoji: APIPartialEmoji): string;
|
|
112
119
|
export declare function hasProps<T extends Record<any, any>>(target: T, props: TypeArray<keyof T>): boolean;
|
|
120
|
+
export declare function hasIntent(intents: number, target: keyof typeof GatewayIntentBits | GatewayIntentBits): boolean;
|
package/lib/common/it/utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ReplaceRegex = exports.BaseHandler = void 0;
|
|
4
|
+
exports.calculateShardId = calculateShardId;
|
|
4
5
|
exports.resolveColor = resolveColor;
|
|
5
6
|
exports.delay = delay;
|
|
6
7
|
exports.isObject = isObject;
|
|
@@ -17,35 +18,47 @@ exports.resolvePartialEmoji = resolvePartialEmoji;
|
|
|
17
18
|
exports.resolveEmoji = resolveEmoji;
|
|
18
19
|
exports.encodeEmoji = encodeEmoji;
|
|
19
20
|
exports.hasProps = hasProps;
|
|
21
|
+
exports.hasIntent = hasIntent;
|
|
20
22
|
const node_fs_1 = require("node:fs");
|
|
21
23
|
const node_path_1 = require("node:path");
|
|
22
24
|
const __1 = require("..");
|
|
23
25
|
const types_1 = require("../../types");
|
|
26
|
+
/**
|
|
27
|
+
* Calculates the shard ID for a guild based on its ID.
|
|
28
|
+
* @param guildId The ID of the guild.
|
|
29
|
+
* @param shards The number of shards to calculate the ID for.
|
|
30
|
+
* @returns The shard ID.
|
|
31
|
+
*/
|
|
32
|
+
function calculateShardId(guildId, shards) {
|
|
33
|
+
return Number((BigInt(guildId) >> 22n) % BigInt(shards ?? 1));
|
|
34
|
+
}
|
|
35
|
+
// It is used for resolve color for better performance
|
|
36
|
+
const ColorLookup = {
|
|
37
|
+
Random: -1, // Special value for random color
|
|
38
|
+
...__1.EmbedColors,
|
|
39
|
+
};
|
|
24
40
|
/**
|
|
25
41
|
* Resolves the color to a numeric representation.
|
|
26
42
|
* @param color The color to resolve.
|
|
27
43
|
* @returns The numeric representation of the color.
|
|
28
44
|
*/
|
|
29
45
|
function resolveColor(color) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return Number.parseInt(color.slice(1), 16);
|
|
36
|
-
if (color in __1.EmbedColors)
|
|
37
|
-
return __1.EmbedColors[color];
|
|
38
|
-
return __1.EmbedColors.Default;
|
|
39
|
-
case 'number':
|
|
40
|
-
return color;
|
|
41
|
-
case 'object':
|
|
42
|
-
if (Array.isArray(color))
|
|
43
|
-
return (color[0] << 16) + (color[1] << 8) + color[2];
|
|
44
|
-
break;
|
|
45
|
-
default:
|
|
46
|
-
return color;
|
|
46
|
+
const type = typeof color;
|
|
47
|
+
if (type === 'number') {
|
|
48
|
+
if (!Number.isInteger(color) || color < 0)
|
|
49
|
+
throw new Error(`Invalid color: ${color}`);
|
|
50
|
+
return color;
|
|
47
51
|
}
|
|
48
|
-
|
|
52
|
+
if (type === 'string') {
|
|
53
|
+
const lookupColor = ColorLookup[color];
|
|
54
|
+
if (lookupColor) {
|
|
55
|
+
return lookupColor === -1 ? Math.floor(Math.random() * 0xffffff) : lookupColor;
|
|
56
|
+
}
|
|
57
|
+
return color.startsWith('#') ? Number.parseInt(color.slice(1), 16) : __1.EmbedColors.Default;
|
|
58
|
+
}
|
|
59
|
+
return Array.isArray(color) && color.length >= 3
|
|
60
|
+
? (color[0] << 16) | (color[1] << 8) | color[2]
|
|
61
|
+
: __1.EmbedColors.Default;
|
|
49
62
|
}
|
|
50
63
|
/**
|
|
51
64
|
* Delays the resolution of a Promise by the specified time.
|
|
@@ -79,7 +92,7 @@ function MergeOptions(defaults, ...options) {
|
|
|
79
92
|
...option,
|
|
80
93
|
...Object.fromEntries(Object.entries(defaults).map(([key, value]) => [
|
|
81
94
|
key,
|
|
82
|
-
isObject(value) ? MergeOptions(value, option?.[key] || {}) : option?.[key] ?? value,
|
|
95
|
+
isObject(value) ? MergeOptions(value, option?.[key] || {}) : (option?.[key] ?? value),
|
|
83
96
|
])),
|
|
84
97
|
}, ...options);
|
|
85
98
|
}
|
|
@@ -178,7 +191,7 @@ function toSnakeCase(target) {
|
|
|
178
191
|
case 'undefined':
|
|
179
192
|
result[exports.ReplaceRegex.snake(key)] = value;
|
|
180
193
|
break;
|
|
181
|
-
case 'object':
|
|
194
|
+
case 'object': {
|
|
182
195
|
if (Array.isArray(value)) {
|
|
183
196
|
result[exports.ReplaceRegex.snake(key)] = value.map(prop => typeof prop === 'object' && prop ? toSnakeCase(prop) : prop);
|
|
184
197
|
break;
|
|
@@ -193,6 +206,7 @@ function toSnakeCase(target) {
|
|
|
193
206
|
}
|
|
194
207
|
result[exports.ReplaceRegex.snake(key)] = toSnakeCase(value);
|
|
195
208
|
break;
|
|
209
|
+
}
|
|
196
210
|
}
|
|
197
211
|
}
|
|
198
212
|
return result;
|
|
@@ -215,7 +229,7 @@ function toCamelCase(target) {
|
|
|
215
229
|
case 'undefined':
|
|
216
230
|
result[exports.ReplaceRegex.camel(key)] = value;
|
|
217
231
|
break;
|
|
218
|
-
case 'object':
|
|
232
|
+
case 'object': {
|
|
219
233
|
if (Array.isArray(value)) {
|
|
220
234
|
result[exports.ReplaceRegex.camel(key)] = value.map(prop => typeof prop === 'object' && prop ? toCamelCase(prop) : prop);
|
|
221
235
|
break;
|
|
@@ -230,6 +244,7 @@ function toCamelCase(target) {
|
|
|
230
244
|
}
|
|
231
245
|
result[exports.ReplaceRegex.camel(key)] = toCamelCase(value);
|
|
232
246
|
break;
|
|
247
|
+
}
|
|
233
248
|
}
|
|
234
249
|
}
|
|
235
250
|
return result;
|
|
@@ -262,7 +277,9 @@ function lazyLoadPackage(mod) {
|
|
|
262
277
|
return require(mod);
|
|
263
278
|
}
|
|
264
279
|
catch (e) {
|
|
265
|
-
|
|
280
|
+
// biome-ignore lint/suspicious/noConsoleLog:
|
|
281
|
+
// biome-ignore lint/suspicious/noConsole:
|
|
282
|
+
console.log(`Cannot import ${mod}`, e);
|
|
266
283
|
return;
|
|
267
284
|
}
|
|
268
285
|
}
|
|
@@ -283,7 +300,11 @@ function resolvePartialEmoji(emoji) {
|
|
|
283
300
|
if (typeof emoji === 'string') {
|
|
284
301
|
const groups = emoji.match(types_1.FormattingPatterns.Emoji)?.groups;
|
|
285
302
|
if (groups) {
|
|
286
|
-
return {
|
|
303
|
+
return {
|
|
304
|
+
animated: !!groups.animated,
|
|
305
|
+
name: groups.name,
|
|
306
|
+
id: groups.id,
|
|
307
|
+
};
|
|
287
308
|
}
|
|
288
309
|
if (emoji.includes('%')) {
|
|
289
310
|
emoji = encodeURIComponent(emoji);
|
|
@@ -305,11 +326,21 @@ async function resolveEmoji(emoji, cache) {
|
|
|
305
326
|
if (!emoji.match(/\d{17,20}/g))
|
|
306
327
|
return;
|
|
307
328
|
const fromCache = await cache.emojis?.get(emoji);
|
|
308
|
-
return fromCache && {
|
|
329
|
+
return (fromCache && {
|
|
330
|
+
animated: fromCache.animated,
|
|
331
|
+
id: fromCache.id,
|
|
332
|
+
name: fromCache.name,
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
if (emoji.id) {
|
|
336
|
+
const fromCache = await cache.emojis?.get(emoji.id);
|
|
337
|
+
if (fromCache)
|
|
338
|
+
return {
|
|
339
|
+
animated: fromCache.animated,
|
|
340
|
+
id: fromCache.id,
|
|
341
|
+
name: fromCache.name,
|
|
342
|
+
};
|
|
309
343
|
}
|
|
310
|
-
const fromCache = await cache.emojis?.get(emoji.id);
|
|
311
|
-
if (fromCache)
|
|
312
|
-
return { animated: fromCache.animated, id: fromCache.id, name: fromCache.name };
|
|
313
344
|
return;
|
|
314
345
|
}
|
|
315
346
|
function encodeEmoji(rawEmoji) {
|
|
@@ -327,3 +358,7 @@ function hasProps(target, props) {
|
|
|
327
358
|
}
|
|
328
359
|
return true;
|
|
329
360
|
}
|
|
361
|
+
function hasIntent(intents, target) {
|
|
362
|
+
const intent = typeof target === 'string' ? types_1.GatewayIntentBits[target] : target;
|
|
363
|
+
return (intents & intent) === intent;
|
|
364
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Entitlement } from '../../structures/Entitlement';
|
|
2
1
|
import type { RESTGetAPIEntitlementsQuery, RESTPostAPIApplicationEmojiJSONBody, RESTPostAPIEntitlementBody } from '../../types';
|
|
3
2
|
import { BaseShorter } from './base';
|
|
4
3
|
export declare class ApplicationShorter extends BaseShorter {
|
|
@@ -28,7 +27,7 @@ export declare class ApplicationShorter extends BaseShorter {
|
|
|
28
27
|
* @param applicationId The ID of the application.
|
|
29
28
|
* @param [query] The query parameters.
|
|
30
29
|
*/
|
|
31
|
-
listEntitlements(applicationId: string, query?: RESTGetAPIEntitlementsQuery): Promise<Entitlement[]>;
|
|
30
|
+
listEntitlements(applicationId: string, query?: RESTGetAPIEntitlementsQuery): Promise<import("../../structures/Entitlement").Entitlement[]>;
|
|
32
31
|
/**
|
|
33
32
|
* Consumes an entitlement for the application.
|
|
34
33
|
* @param applicationId The ID of the application.
|
|
@@ -40,7 +39,7 @@ export declare class ApplicationShorter extends BaseShorter {
|
|
|
40
39
|
* @param applicationId The ID of the application.
|
|
41
40
|
* @param body The body of the request.
|
|
42
41
|
*/
|
|
43
|
-
createTestEntitlement(applicationId: string, body: RESTPostAPIEntitlementBody): Promise<Entitlement>;
|
|
42
|
+
createTestEntitlement(applicationId: string, body: RESTPostAPIEntitlementBody): Promise<import("../../structures/Entitlement").Entitlement>;
|
|
44
43
|
/**
|
|
45
44
|
* Deletes a test entitlement for the application.
|
|
46
45
|
* @param applicationId The ID of the application.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ApplicationShorter = void 0;
|
|
4
|
-
const
|
|
4
|
+
const client_1 = require("../../client");
|
|
5
5
|
const base_1 = require("./base");
|
|
6
6
|
class ApplicationShorter extends base_1.BaseShorter {
|
|
7
7
|
/**
|
|
@@ -40,7 +40,7 @@ class ApplicationShorter extends base_1.BaseShorter {
|
|
|
40
40
|
return this.client.proxy
|
|
41
41
|
.applications(applicationId)
|
|
42
42
|
.entitlements.get({ query })
|
|
43
|
-
.then(et => et.map(e =>
|
|
43
|
+
.then(et => et.map(e => client_1.Transformers.Entitlement(this.client, e)));
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Consumes an entitlement for the application.
|
|
@@ -59,7 +59,7 @@ class ApplicationShorter extends base_1.BaseShorter {
|
|
|
59
59
|
return this.client.proxy
|
|
60
60
|
.applications(applicationId)
|
|
61
61
|
.entitlements.post({ body })
|
|
62
|
-
.then(et =>
|
|
62
|
+
.then(et => client_1.Transformers.Entitlement(this.client, et));
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* Deletes a test entitlement for the application.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BanShorter = void 0;
|
|
4
|
-
const base_1 = require("./base");
|
|
5
4
|
const transformers_1 = require("../../client/transformers");
|
|
5
|
+
const base_1 = require("./base");
|
|
6
6
|
class BanShorter extends base_1.BaseShorter {
|
|
7
7
|
/**
|
|
8
8
|
* Bulk creates bans in the guild.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type
|
|
1
|
+
import { type MessageStructure } from '../../client/transformers';
|
|
2
|
+
import { type AllChannels, type GuildMember, type GuildRole } from '../../structures';
|
|
3
3
|
import { PermissionsBitField } from '../../structures/extra/Permissions';
|
|
4
|
+
import type { APIChannel, RESTGetAPIChannelMessagesQuery, RESTPatchAPIChannelJSONBody, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIGuildForumThreadsJSONBody } from '../../types';
|
|
4
5
|
import { BaseShorter } from './base';
|
|
5
|
-
import { type MessageStructure } from '../../client/transformers';
|
|
6
6
|
export declare class ChannelShorter extends BaseShorter {
|
|
7
7
|
/**
|
|
8
8
|
* Fetches a channel by its ID.
|