seyfert 5.2.2-dev-40506199314.0 → 5.2.2-dev-40764380528.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.
|
@@ -162,6 +162,12 @@ export declare const Formatter: {
|
|
|
162
162
|
* @returns The formatted content.
|
|
163
163
|
*/
|
|
164
164
|
quote(content: string): `> ${string}`;
|
|
165
|
+
/**
|
|
166
|
+
* Formats content into subtext.
|
|
167
|
+
* @param content The content to format.
|
|
168
|
+
* @returns The formatted content.
|
|
169
|
+
*/
|
|
170
|
+
subtext(content: string): `-# ${string}`;
|
|
165
171
|
/**
|
|
166
172
|
* Formats a message link.
|
|
167
173
|
* @param guildId The ID of the guild.
|
|
@@ -209,6 +215,13 @@ export declare const Formatter: {
|
|
|
209
215
|
* @returns The formatted channel mention.
|
|
210
216
|
*/
|
|
211
217
|
channelMention(channelId: string): `<#${string}>`;
|
|
218
|
+
/**
|
|
219
|
+
* Formats a slash command mention.
|
|
220
|
+
* @param name The name of the command, including subcommands (e.g. `config set`).
|
|
221
|
+
* @param commandId The ID of the command.
|
|
222
|
+
* @returns The formatted command mention.
|
|
223
|
+
*/
|
|
224
|
+
commandMention(name: string, commandId: string): `</${string}:${string}>`;
|
|
212
225
|
/**
|
|
213
226
|
* Formats an emoji.
|
|
214
227
|
* @param emojiId The ID of the emoji.
|
|
@@ -223,6 +236,12 @@ export declare const Formatter: {
|
|
|
223
236
|
* @returns The formatted channel link.
|
|
224
237
|
*/
|
|
225
238
|
channelLink(channelId: string, guildId?: string): ChannelLink;
|
|
239
|
+
/**
|
|
240
|
+
* Formats a guild navigation mention.
|
|
241
|
+
* @param type The guild page to link to.
|
|
242
|
+
* @returns The formatted guild navigation mention.
|
|
243
|
+
*/
|
|
244
|
+
guildNavigation(type: 'customize' | 'browse' | 'guide' | 'linked-roles'): `<id:${string}>`;
|
|
226
245
|
/**
|
|
227
246
|
* Forms a oauth2 invite link for the bot.
|
|
228
247
|
* @param applicationId The ID of the application.
|
|
@@ -157,6 +157,14 @@ exports.Formatter = {
|
|
|
157
157
|
quote(content) {
|
|
158
158
|
return `> ${content}`;
|
|
159
159
|
},
|
|
160
|
+
/**
|
|
161
|
+
* Formats content into subtext.
|
|
162
|
+
* @param content The content to format.
|
|
163
|
+
* @returns The formatted content.
|
|
164
|
+
*/
|
|
165
|
+
subtext(content) {
|
|
166
|
+
return `-# ${content}`;
|
|
167
|
+
},
|
|
160
168
|
/**
|
|
161
169
|
* Formats a message link.
|
|
162
170
|
* @param guildId The ID of the guild.
|
|
@@ -223,6 +231,15 @@ exports.Formatter = {
|
|
|
223
231
|
channelMention(channelId) {
|
|
224
232
|
return `<#${channelId}>`;
|
|
225
233
|
},
|
|
234
|
+
/**
|
|
235
|
+
* Formats a slash command mention.
|
|
236
|
+
* @param name The name of the command, including subcommands (e.g. `config set`).
|
|
237
|
+
* @param commandId The ID of the command.
|
|
238
|
+
* @returns The formatted command mention.
|
|
239
|
+
*/
|
|
240
|
+
commandMention(name, commandId) {
|
|
241
|
+
return `</${name}:${commandId}>`;
|
|
242
|
+
},
|
|
226
243
|
/**
|
|
227
244
|
* Formats an emoji.
|
|
228
245
|
* @param emojiId The ID of the emoji.
|
|
@@ -241,6 +258,14 @@ exports.Formatter = {
|
|
|
241
258
|
channelLink(channelId, guildId) {
|
|
242
259
|
return `https://discord.com/channels/${guildId ?? '@me'}/${channelId}`;
|
|
243
260
|
},
|
|
261
|
+
/**
|
|
262
|
+
* Formats a guild navigation mention.
|
|
263
|
+
* @param type The guild page to link to.
|
|
264
|
+
* @returns The formatted guild navigation mention.
|
|
265
|
+
*/
|
|
266
|
+
guildNavigation(type) {
|
|
267
|
+
return `<id:${type}>`;
|
|
268
|
+
},
|
|
244
269
|
/**
|
|
245
270
|
* Forms a oauth2 invite link for the bot.
|
|
246
271
|
* @param applicationId The ID of the application.
|
package/lib/common/it/utils.js
CHANGED
|
@@ -327,7 +327,7 @@ function resolvePartialEmoji(emoji) {
|
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
329
|
if (emoji.includes('%')) {
|
|
330
|
-
emoji =
|
|
330
|
+
emoji = decodeURIComponent(emoji);
|
|
331
331
|
}
|
|
332
332
|
if (!(emoji.includes(':') || emoji.match(/\d{17,20}/g))) {
|
|
333
333
|
return { name: emoji, id: null };
|
|
@@ -26,6 +26,7 @@ class ComponentHandler extends common_1.BaseHandler {
|
|
|
26
26
|
return str => (0, customId_1.matchesCustomId)(match, str);
|
|
27
27
|
}
|
|
28
28
|
createComponentCollector(messageId, channelId, guildId, options = {}, components = []) {
|
|
29
|
+
this.clearValue(messageId);
|
|
29
30
|
this.values.set(messageId, {
|
|
30
31
|
messageId,
|
|
31
32
|
channelId,
|