mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
refactor(formatters): Change :_: emoji name placeholder (#10567)
* Change `:_:` emoji name placeholder * Update tests * Format
This commit is contained in:
@@ -313,7 +313,7 @@ export function chatInputApplicationCommandMention<
|
||||
* @typeParam EmojiId - This is inferred by the supplied emoji id
|
||||
* @param emojiId - The emoji id to format
|
||||
*/
|
||||
export function formatEmoji<EmojiId extends Snowflake>(emojiId: EmojiId, animated?: false): `<:_:${EmojiId}>`;
|
||||
export function formatEmoji<EmojiId extends Snowflake>(emojiId: EmojiId, animated?: false): `<:emoji:${EmojiId}>`;
|
||||
|
||||
/**
|
||||
* Formats an animated emoji id into a fully qualified emoji identifier.
|
||||
@@ -322,7 +322,7 @@ export function formatEmoji<EmojiId extends Snowflake>(emojiId: EmojiId, animate
|
||||
* @param emojiId - The emoji id to format
|
||||
* @param animated - Whether the emoji is animated
|
||||
*/
|
||||
export function formatEmoji<EmojiId extends Snowflake>(emojiId: EmojiId, animated?: true): `<a:_:${EmojiId}>`;
|
||||
export function formatEmoji<EmojiId extends Snowflake>(emojiId: EmojiId, animated?: true): `<a:emoji:${EmojiId}>`;
|
||||
|
||||
/**
|
||||
* Formats an emoji id into a fully qualified emoji identifier.
|
||||
@@ -334,7 +334,7 @@ export function formatEmoji<EmojiId extends Snowflake>(emojiId: EmojiId, animate
|
||||
export function formatEmoji<EmojiId extends Snowflake>(
|
||||
emojiId: EmojiId,
|
||||
animated?: boolean,
|
||||
): `<:_:${EmojiId}>` | `<a:_:${EmojiId}>`;
|
||||
): `<:emoji:${EmojiId}>` | `<a:emoji:${EmojiId}>`;
|
||||
|
||||
/**
|
||||
* Formats a non-animated emoji id and name into a fully qualified emoji identifier.
|
||||
@@ -383,7 +383,7 @@ export function formatEmoji<EmojiId extends Snowflake, EmojiName extends string>
|
||||
|
||||
const { id, animated: isAnimated, name: emojiName } = options;
|
||||
|
||||
return `<${isAnimated ? 'a' : ''}:${emojiName ?? '_'}:${id}>`;
|
||||
return `<${isAnimated ? 'a' : ''}:${emojiName ?? 'emoji'}:${id}>`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user