diff --git a/packages/formatters/__tests__/formatters.test.ts b/packages/formatters/__tests__/formatters.test.ts index 1719a98dc..b8b4a1e62 100644 --- a/packages/formatters/__tests__/formatters.test.ts +++ b/packages/formatters/__tests__/formatters.test.ts @@ -24,7 +24,7 @@ import { strikethrough, time, TimestampStyles, - underscore, + underline, unorderedList, userMention, } from '../src/index.js'; @@ -58,9 +58,9 @@ describe('Message formatters', () => { }); }); - describe('underscore', () => { + describe('underline', () => { test('GIVEN "discord.js" THEN returns "__discord.js__"', () => { - expect<'__discord.js__'>(underscore('discord.js')).toEqual('__discord.js__'); + expect<'__discord.js__'>(underline('discord.js')).toEqual('__discord.js__'); }); }); diff --git a/packages/formatters/src/formatters.ts b/packages/formatters/src/formatters.ts index 3a31e306f..12d6dbac9 100644 --- a/packages/formatters/src/formatters.ts +++ b/packages/formatters/src/formatters.ts @@ -61,8 +61,19 @@ export function bold(content: Content): `**${Content}**` * * @typeParam Content - This is inferred by the supplied content * @param content - The content to wrap + * @deprecated Use {@link underline} instead. */ export function underscore(content: Content): `__${Content}__` { + return underline(content); +} + +/** + * Formats the content into underlined text. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + */ +export function underline(content: Content): `__${Content}__` { return `__${content}__`; }