@discordjs/formatters 0.4.0-dev.1699747812-62e657329 → 0.4.0-dev.1709467477-9fa115df8

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/dist/index.d.mts CHANGED
@@ -173,77 +173,85 @@ declare function escapeMaskedLink(text: string): string;
173
173
  /**
174
174
  * Wraps the content inside a code block with no language.
175
175
  *
176
- * @typeParam C - This is inferred by the supplied content
176
+ * @typeParam Content - This is inferred by the supplied content
177
177
  * @param content - The content to wrap
178
178
  */
179
- declare function codeBlock<C extends string>(content: C): `\`\`\`\n${C}\n\`\`\``;
179
+ declare function codeBlock<Content extends string>(content: Content): `\`\`\`\n${Content}\n\`\`\``;
180
180
  /**
181
181
  * Wraps the content inside a code block with the specified language.
182
182
  *
183
- * @typeParam L - This is inferred by the supplied language
184
- * @typeParam C - This is inferred by the supplied content
183
+ * @typeParam Language - This is inferred by the supplied language
184
+ * @typeParam Content - This is inferred by the supplied content
185
185
  * @param language - The language for the code block
186
186
  * @param content - The content to wrap
187
187
  */
188
- declare function codeBlock<L extends string, C extends string>(language: L, content: C): `\`\`\`${L}\n${C}\n\`\`\``;
188
+ declare function codeBlock<Language extends string, Content extends string>(language: Language, content: Content): `\`\`\`${Language}\n${Content}\n\`\`\``;
189
189
  /**
190
190
  * Wraps the content inside \`backticks\` which formats it as inline code.
191
191
  *
192
- * @typeParam C - This is inferred by the supplied content
192
+ * @typeParam Content - This is inferred by the supplied content
193
193
  * @param content - The content to wrap
194
194
  */
195
- declare function inlineCode<C extends string>(content: C): `\`${C}\``;
195
+ declare function inlineCode<Content extends string>(content: Content): `\`${Content}\``;
196
196
  /**
197
197
  * Formats the content into italic text.
198
198
  *
199
- * @typeParam C - This is inferred by the supplied content
199
+ * @typeParam Content - This is inferred by the supplied content
200
200
  * @param content - The content to wrap
201
201
  */
202
- declare function italic<C extends string>(content: C): `_${C}_`;
202
+ declare function italic<Content extends string>(content: Content): `_${Content}_`;
203
203
  /**
204
204
  * Formats the content into bold text.
205
205
  *
206
- * @typeParam C - This is inferred by the supplied content
206
+ * @typeParam Content - This is inferred by the supplied content
207
207
  * @param content - The content to wrap
208
208
  */
209
- declare function bold<C extends string>(content: C): `**${C}**`;
209
+ declare function bold<Content extends string>(content: Content): `**${Content}**`;
210
210
  /**
211
211
  * Formats the content into underscored text.
212
212
  *
213
- * @typeParam C - This is inferred by the supplied content
213
+ * @typeParam Content - This is inferred by the supplied content
214
214
  * @param content - The content to wrap
215
+ * @deprecated Use {@link underline} instead.
215
216
  */
216
- declare function underscore<C extends string>(content: C): `__${C}__`;
217
+ declare function underscore<Content extends string>(content: Content): `__${Content}__`;
218
+ /**
219
+ * Formats the content into underlined text.
220
+ *
221
+ * @typeParam Content - This is inferred by the supplied content
222
+ * @param content - The content to wrap
223
+ */
224
+ declare function underline<Content extends string>(content: Content): `__${Content}__`;
217
225
  /**
218
226
  * Formats the content into strike-through text.
219
227
  *
220
- * @typeParam C - This is inferred by the supplied content
228
+ * @typeParam Content - This is inferred by the supplied content
221
229
  * @param content - The content to wrap
222
230
  */
223
- declare function strikethrough<C extends string>(content: C): `~~${C}~~`;
231
+ declare function strikethrough<Content extends string>(content: Content): `~~${Content}~~`;
224
232
  /**
225
233
  * Formats the content into a quote.
226
234
  *
227
235
  * @remarks This needs to be at the start of the line for Discord to format it.
228
- * @typeParam C - This is inferred by the supplied content
236
+ * @typeParam Content - This is inferred by the supplied content
229
237
  * @param content - The content to wrap
230
238
  */
231
- declare function quote<C extends string>(content: C): `> ${C}`;
239
+ declare function quote<Content extends string>(content: Content): `> ${Content}`;
232
240
  /**
233
241
  * Formats the content into a block quote.
234
242
  *
235
243
  * @remarks This needs to be at the start of the line for Discord to format it.
236
- * @typeParam C - This is inferred by the supplied content
244
+ * @typeParam Content - This is inferred by the supplied content
237
245
  * @param content - The content to wrap
238
246
  */
239
- declare function blockQuote<C extends string>(content: C): `>>> ${C}`;
247
+ declare function blockQuote<Content extends string>(content: Content): `>>> ${Content}`;
240
248
  /**
241
249
  * Wraps the URL into `<>` which stops it from embedding.
242
250
  *
243
- * @typeParam C - This is inferred by the supplied content
251
+ * @typeParam Content - This is inferred by the supplied content
244
252
  * @param url - The URL to wrap
245
253
  */
246
- declare function hideLinkEmbed<C extends string>(url: C): `<${C}>`;
254
+ declare function hideLinkEmbed<Content extends string>(url: Content): `<${Content}>`;
247
255
  /**
248
256
  * Wraps the URL into `<>` which stops it from embedding.
249
257
  *
@@ -253,161 +261,209 @@ declare function hideLinkEmbed(url: URL): `<${string}>`;
253
261
  /**
254
262
  * Formats the content and the URL into a masked URL.
255
263
  *
256
- * @typeParam C - This is inferred by the supplied content
264
+ * @typeParam Content - This is inferred by the supplied content
257
265
  * @param content - The content to display
258
266
  * @param url - The URL the content links to
259
267
  */
260
- declare function hyperlink<C extends string>(content: C, url: URL): `[${C}](${string})`;
268
+ declare function hyperlink<Content extends string>(content: Content, url: URL): `[${Content}](${string})`;
261
269
  /**
262
270
  * Formats the content and the URL into a masked URL.
263
271
  *
264
- * @typeParam C - This is inferred by the supplied content
265
- * @typeParam U - This is inferred by the supplied URL
272
+ * @typeParam Content - This is inferred by the supplied content
273
+ * @typeParam Url - This is inferred by the supplied URL
266
274
  * @param content - The content to display
267
275
  * @param url - The URL the content links to
268
276
  */
269
- declare function hyperlink<C extends string, U extends string>(content: C, url: U): `[${C}](${U})`;
277
+ declare function hyperlink<Content extends string, Url extends string>(content: Content, url: Url): `[${Content}](${Url})`;
270
278
  /**
271
279
  * Formats the content and the URL into a masked URL with a custom tooltip.
272
280
  *
273
- * @typeParam C - This is inferred by the supplied content
274
- * @typeParam T - This is inferred by the supplied title
281
+ * @typeParam Content - This is inferred by the supplied content
282
+ * @typeParam Title - This is inferred by the supplied title
275
283
  * @param content - The content to display
276
284
  * @param url - The URL the content links to
277
285
  * @param title - The title shown when hovering on the masked link
278
286
  */
279
- declare function hyperlink<C extends string, T extends string>(content: C, url: URL, title: T): `[${C}](${string} "${T}")`;
287
+ declare function hyperlink<Content extends string, Title extends string>(content: Content, url: URL, title: Title): `[${Content}](${string} "${Title}")`;
280
288
  /**
281
289
  * Formats the content and the URL into a masked URL with a custom tooltip.
282
290
  *
283
- * @typeParam C - This is inferred by the supplied content
284
- * @typeParam U - This is inferred by the supplied URL
285
- * @typeParam T - This is inferred by the supplied title
291
+ * @typeParam Content - This is inferred by the supplied content
292
+ * @typeParam Url - This is inferred by the supplied URL
293
+ * @typeParam Title - This is inferred by the supplied title
286
294
  * @param content - The content to display
287
295
  * @param url - The URL the content links to
288
296
  * @param title - The title shown when hovering on the masked link
289
297
  */
290
- declare function hyperlink<C extends string, U extends string, T extends string>(content: C, url: U, title: T): `[${C}](${U} "${T}")`;
298
+ declare function hyperlink<Content extends string, Url extends string, Title extends string>(content: Content, url: Url, title: Title): `[${Content}](${Url} "${Title}")`;
291
299
  /**
292
300
  * Formats the content into a spoiler.
293
301
  *
294
- * @typeParam C - This is inferred by the supplied content
302
+ * @typeParam Content - This is inferred by the supplied content
295
303
  * @param content - The content to wrap
296
304
  */
297
- declare function spoiler<C extends string>(content: C): `||${C}||`;
305
+ declare function spoiler<Content extends string>(content: Content): `||${Content}||`;
298
306
  /**
299
307
  * Formats a user id into a user mention.
300
308
  *
301
- * @typeParam C - This is inferred by the supplied user id
309
+ * @typeParam UserId - This is inferred by the supplied user id
302
310
  * @param userId - The user id to format
303
311
  */
304
- declare function userMention<C extends Snowflake>(userId: C): `<@${C}>`;
312
+ declare function userMention<UserId extends Snowflake>(userId: UserId): `<@${UserId}>`;
305
313
  /**
306
314
  * Formats a channel id into a channel mention.
307
315
  *
308
- * @typeParam C - This is inferred by the supplied channel id
316
+ * @typeParam ChannelId - This is inferred by the supplied channel id
309
317
  * @param channelId - The channel id to format
310
318
  */
311
- declare function channelMention<C extends Snowflake>(channelId: C): `<#${C}>`;
319
+ declare function channelMention<ChannelId extends Snowflake>(channelId: ChannelId): `<#${ChannelId}>`;
312
320
  /**
313
321
  * Formats a role id into a role mention.
314
322
  *
315
- * @typeParam C - This is inferred by the supplied role id
323
+ * @typeParam RoleId - This is inferred by the supplied role id
316
324
  * @param roleId - The role id to format
317
325
  */
318
- declare function roleMention<C extends Snowflake>(roleId: C): `<@&${C}>`;
326
+ declare function roleMention<RoleId extends Snowflake>(roleId: RoleId): `<@&${RoleId}>`;
319
327
  /**
320
328
  * Formats an application command name, subcommand group name, subcommand name, and id into an application command mention.
321
329
  *
322
- * @typeParam N - This is inferred by the supplied command name
323
- * @typeParam G - This is inferred by the supplied subcommand group name
324
- * @typeParam S - This is inferred by the supplied subcommand name
325
- * @typeParam I - This is inferred by the supplied command id
330
+ * @typeParam CommandName - This is inferred by the supplied command name
331
+ * @typeParam SubcommandGroupName - This is inferred by the supplied subcommand group name
332
+ * @typeParam SubcommandName - This is inferred by the supplied subcommand name
333
+ * @typeParam CommandId - This is inferred by the supplied command id
326
334
  * @param commandName - The application command name to format
327
335
  * @param subcommandGroupName - The subcommand group name to format
328
336
  * @param subcommandName - The subcommand name to format
329
337
  * @param commandId - The application command id to format
330
338
  */
331
- declare function chatInputApplicationCommandMention<N extends string, G extends string, S extends string, I extends Snowflake>(commandName: N, subcommandGroupName: G, subcommandName: S, commandId: I): `</${N} ${G} ${S}:${I}>`;
339
+ declare function chatInputApplicationCommandMention<CommandName extends string, SubcommandGroupName extends string, SubcommandName extends string, CommandId extends Snowflake>(commandName: CommandName, subcommandGroupName: SubcommandGroupName, subcommandName: SubcommandName, commandId: CommandId): `</${CommandName} ${SubcommandGroupName} ${SubcommandName}:${CommandId}>`;
332
340
  /**
333
341
  * Formats an application command name, subcommand name, and id into an application command mention.
334
342
  *
335
- * @typeParam N - This is inferred by the supplied command name
336
- * @typeParam S - This is inferred by the supplied subcommand name
337
- * @typeParam I - This is inferred by the supplied command id
343
+ * @typeParam CommandName - This is inferred by the supplied command name
344
+ * @typeParam SubcommandName - This is inferred by the supplied subcommand name
345
+ * @typeParam CommandId - This is inferred by the supplied command id
338
346
  * @param commandName - The application command name to format
339
347
  * @param subcommandName - The subcommand name to format
340
348
  * @param commandId - The application command id to format
341
349
  */
342
- declare function chatInputApplicationCommandMention<N extends string, S extends string, I extends Snowflake>(commandName: N, subcommandName: S, commandId: I): `</${N} ${S}:${I}>`;
350
+ declare function chatInputApplicationCommandMention<CommandName extends string, SubcommandName extends string, CommandId extends Snowflake>(commandName: CommandName, subcommandName: SubcommandName, commandId: CommandId): `</${CommandName} ${SubcommandName}:${CommandId}>`;
343
351
  /**
344
352
  * Formats an application command name and id into an application command mention.
345
353
  *
346
- * @typeParam N - This is inferred by the supplied command name
347
- * @typeParam I - This is inferred by the supplied command id
354
+ * @typeParam CommandName - This is inferred by the supplied command name
355
+ * @typeParam CommandId - This is inferred by the supplied command id
348
356
  * @param commandName - The application command name to format
349
357
  * @param commandId - The application command id to format
350
358
  */
351
- declare function chatInputApplicationCommandMention<N extends string, I extends Snowflake>(commandName: N, commandId: I): `</${N}:${I}>`;
359
+ declare function chatInputApplicationCommandMention<CommandName extends string, CommandId extends Snowflake>(commandName: CommandName, commandId: CommandId): `</${CommandName}:${CommandId}>`;
352
360
  /**
353
361
  * Formats a non-animated emoji id into a fully qualified emoji identifier.
354
362
  *
355
- * @typeParam C - This is inferred by the supplied emoji id
363
+ * @typeParam EmojiId - This is inferred by the supplied emoji id
356
364
  * @param emojiId - The emoji id to format
357
365
  */
358
- declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: false): `<:_:${C}>`;
366
+ declare function formatEmoji<EmojiId extends Snowflake>(emojiId: EmojiId, animated?: false): `<:_:${EmojiId}>`;
359
367
  /**
360
368
  * Formats an animated emoji id into a fully qualified emoji identifier.
361
369
  *
362
- * @typeParam C - This is inferred by the supplied emoji id
370
+ * @typeParam EmojiId - This is inferred by the supplied emoji id
363
371
  * @param emojiId - The emoji id to format
364
372
  * @param animated - Whether the emoji is animated
365
373
  */
366
- declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: true): `<a:_:${C}>`;
374
+ declare function formatEmoji<EmojiId extends Snowflake>(emojiId: EmojiId, animated?: true): `<a:_:${EmojiId}>`;
367
375
  /**
368
376
  * Formats an emoji id into a fully qualified emoji identifier.
369
377
  *
370
- * @typeParam C - This is inferred by the supplied emoji id
378
+ * @typeParam EmojiId - This is inferred by the supplied emoji id
371
379
  * @param emojiId - The emoji id to format
372
380
  * @param animated - Whether the emoji is animated
373
381
  */
374
- declare function formatEmoji<C extends Snowflake>(emojiId: C, animated?: boolean): `<:_:${C}>` | `<a:_:${C}>`;
382
+ declare function formatEmoji<EmojiId extends Snowflake>(emojiId: EmojiId, animated?: boolean): `<:_:${EmojiId}>` | `<a:_:${EmojiId}>`;
383
+ /**
384
+ * Formats a non-animated emoji id and name into a fully qualified emoji identifier.
385
+ *
386
+ * @typeParam EmojiId - This is inferred by the supplied emoji id
387
+ * @typeParam EmojiName - This is inferred by the supplied name
388
+ * @param options - The options for formatting an emoji
389
+ */
390
+ declare function formatEmoji<EmojiId extends Snowflake, EmojiName extends string>(options: FormatEmojiOptions<EmojiId, EmojiName> & {
391
+ animated: true;
392
+ }): `<a:${EmojiName}:${EmojiId}>`;
393
+ /**
394
+ * Formats an animated emoji id and name into a fully qualified emoji identifier.
395
+ *
396
+ * @typeParam EmojiId - This is inferred by the supplied emoji id
397
+ * @typeParam EmojiName - This is inferred by the supplied name
398
+ * @param options - The options for formatting an emoji
399
+ */
400
+ declare function formatEmoji<EmojiId extends Snowflake, EmojiName extends string>(options: FormatEmojiOptions<EmojiId, EmojiName> & {
401
+ animated?: false;
402
+ }): `<:${EmojiName}:${EmojiId}>`;
403
+ /**
404
+ * Formats an emoji id and name into a fully qualified emoji identifier.
405
+ *
406
+ * @typeParam EmojiId - This is inferred by the supplied emoji id
407
+ * @typeParam EmojiName - This is inferred by the supplied emoji name
408
+ * @param options - The options for formatting an emoji
409
+ */
410
+ declare function formatEmoji<EmojiId extends Snowflake, EmojiName extends string>(options: FormatEmojiOptions<EmojiId, EmojiName>): `<:${EmojiName}:${EmojiId}>` | `<a:${EmojiName}:${EmojiId}>`;
411
+ /**
412
+ * The options for formatting an emoji.
413
+ *
414
+ * @typeParam EmojiId - This is inferred by the supplied emoji id
415
+ * @typeParam EmojiName - This is inferred by the supplied emoji name
416
+ */
417
+ interface FormatEmojiOptions<EmojiId extends Snowflake, EmojiName extends string> {
418
+ /**
419
+ * Whether the emoji is animated
420
+ */
421
+ animated?: boolean;
422
+ /**
423
+ * The emoji id to format
424
+ */
425
+ id: EmojiId;
426
+ /**
427
+ * The name of the emoji
428
+ */
429
+ name?: EmojiName;
430
+ }
375
431
  /**
376
432
  * Formats a channel link for a direct message channel.
377
433
  *
378
- * @typeParam C - This is inferred by the supplied channel id
434
+ * @typeParam ChannelId - This is inferred by the supplied channel id
379
435
  * @param channelId - The channel's id
380
436
  */
381
- declare function channelLink<C extends Snowflake>(channelId: C): `https://discord.com/channels/@me/${C}`;
437
+ declare function channelLink<ChannelId extends Snowflake>(channelId: ChannelId): `https://discord.com/channels/@me/${ChannelId}`;
382
438
  /**
383
439
  * Formats a channel link for a guild channel.
384
440
  *
385
- * @typeParam C - This is inferred by the supplied channel id
386
- * @typeParam G - This is inferred by the supplied guild id
441
+ * @typeParam ChannelId - This is inferred by the supplied channel id
442
+ * @typeParam GuildId - This is inferred by the supplied guild id
387
443
  * @param channelId - The channel's id
388
444
  * @param guildId - The guild's id
389
445
  */
390
- declare function channelLink<C extends Snowflake, G extends Snowflake>(channelId: C, guildId: G): `https://discord.com/channels/${G}/${C}`;
446
+ declare function channelLink<ChannelId extends Snowflake, GuildId extends Snowflake>(channelId: ChannelId, guildId: GuildId): `https://discord.com/channels/${GuildId}/${ChannelId}`;
391
447
  /**
392
448
  * Formats a message link for a direct message channel.
393
449
  *
394
- * @typeParam C - This is inferred by the supplied channel id
395
- * @typeParam M - This is inferred by the supplied message id
450
+ * @typeParam ChannelId - This is inferred by the supplied channel id
451
+ * @typeParam MessageId - This is inferred by the supplied message id
396
452
  * @param channelId - The channel's id
397
453
  * @param messageId - The message's id
398
454
  */
399
- declare function messageLink<C extends Snowflake, M extends Snowflake>(channelId: C, messageId: M): `https://discord.com/channels/@me/${C}/${M}`;
455
+ declare function messageLink<ChannelId extends Snowflake, MessageId extends Snowflake>(channelId: ChannelId, messageId: MessageId): `https://discord.com/channels/@me/${ChannelId}/${MessageId}`;
400
456
  /**
401
457
  * Formats a message link for a guild channel.
402
458
  *
403
- * @typeParam C - This is inferred by the supplied channel id
404
- * @typeParam M - This is inferred by the supplied message id
405
- * @typeParam G - This is inferred by the supplied guild id
459
+ * @typeParam ChannelId - This is inferred by the supplied channel id
460
+ * @typeParam MessageId - This is inferred by the supplied message id
461
+ * @typeParam GuildId - This is inferred by the supplied guild id
406
462
  * @param channelId - The channel's id
407
463
  * @param messageId - The message's id
408
464
  * @param guildId - The guild's id
409
465
  */
410
- declare function messageLink<C extends Snowflake, M extends Snowflake, G extends Snowflake>(channelId: C, messageId: M, guildId: G): `https://discord.com/channels/${G}/${C}/${M}`;
466
+ declare function messageLink<ChannelId extends Snowflake, MessageId extends Snowflake, GuildId extends Snowflake>(channelId: ChannelId, messageId: MessageId, guildId: GuildId): `https://discord.com/channels/${GuildId}/${ChannelId}/${MessageId}`;
411
467
  /**
412
468
  * The heading levels for expanded markdown.
413
469
  */
@@ -428,31 +484,31 @@ declare enum HeadingLevel {
428
484
  /**
429
485
  * Formats the content into a heading level.
430
486
  *
431
- * @typeParam C - This is inferred by the supplied content
487
+ * @typeParam Content - This is inferred by the supplied content
432
488
  * @param content - The content to wrap
433
489
  * @param level - The heading level
434
490
  */
435
- declare function heading<C extends string>(content: C, level?: HeadingLevel.One): `# ${C}`;
491
+ declare function heading<Content extends string>(content: Content, level?: HeadingLevel.One): `# ${Content}`;
436
492
  /**
437
493
  * Formats the content into a heading level.
438
494
  *
439
- * @typeParam C - This is inferred by the supplied content
495
+ * @typeParam Content - This is inferred by the supplied content
440
496
  * @param content - The content to wrap
441
497
  * @param level - The heading level
442
498
  */
443
- declare function heading<C extends string>(content: C, level: HeadingLevel.Two): `## ${C}`;
499
+ declare function heading<Content extends string>(content: Content, level: HeadingLevel.Two): `## ${Content}`;
444
500
  /**
445
501
  * Formats the content into a heading level.
446
502
  *
447
- * @typeParam C - This is inferred by the supplied content
503
+ * @typeParam Content - This is inferred by the supplied content
448
504
  * @param content - The content to wrap
449
505
  * @param level - The heading level
450
506
  */
451
- declare function heading<C extends string>(content: C, level: HeadingLevel.Three): `### ${C}`;
507
+ declare function heading<Content extends string>(content: Content, level: HeadingLevel.Three): `### ${Content}`;
452
508
  /**
453
509
  * A type that recursively traverses into arrays.
454
510
  */
455
- type RecursiveArray<T> = readonly (RecursiveArray<T> | T)[];
511
+ type RecursiveArray<ItemType> = readonly (ItemType | RecursiveArray<ItemType>)[];
456
512
  /**
457
513
  * Formats the elements in the array to an ordered list.
458
514
  *
@@ -475,27 +531,27 @@ declare function time(date?: Date): `<t:${bigint}>`;
475
531
  /**
476
532
  * Formats a date given a format style.
477
533
  *
478
- * @typeParam S - This is inferred by the supplied {@link TimestampStylesString}
534
+ * @typeParam Style - This is inferred by the supplied {@link TimestampStylesString}
479
535
  * @param date - The date to format
480
536
  * @param style - The style to use
481
537
  */
482
- declare function time<S extends TimestampStylesString>(date: Date, style: S): `<t:${bigint}:${S}>`;
538
+ declare function time<Style extends TimestampStylesString>(date: Date, style: Style): `<t:${bigint}:${Style}>`;
483
539
  /**
484
540
  * Formats the given timestamp into a short date-time string.
485
541
  *
486
- * @typeParam C - This is inferred by the supplied timestamp
542
+ * @typeParam Seconds - This is inferred by the supplied timestamp
487
543
  * @param seconds - A Unix timestamp in seconds
488
544
  */
489
- declare function time<C extends number>(seconds: C): `<t:${C}>`;
545
+ declare function time<Seconds extends number>(seconds: Seconds): `<t:${Seconds}>`;
490
546
  /**
491
547
  * Formats the given timestamp into a short date-time string.
492
548
  *
493
- * @typeParam C - This is inferred by the supplied timestamp
494
- * @typeParam S - This is inferred by the supplied {@link TimestampStylesString}
549
+ * @typeParam Seconds - This is inferred by the supplied timestamp
550
+ * @typeParam Style - This is inferred by the supplied {@link TimestampStylesString}
495
551
  * @param seconds - A Unix timestamp in seconds
496
552
  * @param style - The style to use
497
553
  */
498
- declare function time<C extends number, S extends TimestampStylesString>(seconds: C, style: S): `<t:${C}:${S}>`;
554
+ declare function time<Seconds extends number, Style extends TimestampStylesString>(seconds: Seconds, style: Style): `<t:${Seconds}:${Style}>`;
499
555
  /**
500
556
  * The {@link https://discord.com/developers/docs/reference#message-formatting-timestamp-styles | message formatting timestamp styles}
501
557
  * supported by Discord.
@@ -555,7 +611,7 @@ declare enum Faces {
555
611
  /**
556
612
  * `¯\_(ツ)_/¯`
557
613
  */
558
- Shrug = "\u00AF_(\u30C4)_/\u00AF",
614
+ Shrug = "\u00AF\\_(\u30C4)_/\u00AF",
559
615
  /**
560
616
  * `(╯°□°)╯︵ ┻━┻`
561
617
  */
@@ -583,4 +639,12 @@ declare enum GuildNavigationMentions {
583
639
  Guide = "<id:guide>"
584
640
  }
585
641
 
586
- export { EscapeMarkdownOptions, Faces, GuildNavigationMentions, HeadingLevel, RecursiveArray, TimestampStyles, TimestampStylesString, blockQuote, bold, channelLink, channelMention, chatInputApplicationCommandMention, codeBlock, escapeBold, escapeBulletedList, escapeCodeBlock, escapeEscape, escapeHeading, escapeInlineCode, escapeItalic, escapeMarkdown, escapeMaskedLink, escapeNumberedList, escapeSpoiler, escapeStrikethrough, escapeUnderline, formatEmoji, heading, hideLinkEmbed, hyperlink, inlineCode, italic, messageLink, orderedList, quote, roleMention, spoiler, strikethrough, time, underscore, unorderedList, userMention };
642
+ /**
643
+ * The {@link https://github.com/discordjs/discord.js/blob/main/packages/formatters#readme | @discordjs/formatters} version
644
+ * that you are currently using.
645
+ *
646
+ * @privateRemarks This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild.
647
+ */
648
+ declare const version: string;
649
+
650
+ export { type EscapeMarkdownOptions, Faces, type FormatEmojiOptions, GuildNavigationMentions, HeadingLevel, type RecursiveArray, TimestampStyles, type TimestampStylesString, blockQuote, bold, channelLink, channelMention, chatInputApplicationCommandMention, codeBlock, escapeBold, escapeBulletedList, escapeCodeBlock, escapeEscape, escapeHeading, escapeInlineCode, escapeItalic, escapeMarkdown, escapeMaskedLink, escapeNumberedList, escapeSpoiler, escapeStrikethrough, escapeUnderline, formatEmoji, heading, hideLinkEmbed, hyperlink, inlineCode, italic, messageLink, orderedList, quote, roleMention, spoiler, strikethrough, time, underline, underscore, unorderedList, userMention, version };