refactor: Remove nickname parsing (#7736)

* refactor: remove nickname parsing

* types: remove nickname import

* chore: update guildmember

* refactor: keep parsing

* refactor: string from user instead
This commit is contained in:
Jiralite
2022-04-12 16:15:38 +01:00
committed by GitHub
parent 3db20abdd2
commit 78a3afcd7f
6 changed files with 4 additions and 33 deletions

View File

@@ -9,7 +9,6 @@ import {
hyperlink,
inlineCode,
italic,
memberNicknameMention,
quote,
roleMention,
spoiler,
@@ -122,12 +121,6 @@ describe('Message formatters', () => {
});
});
describe('memberNicknameMention', () => {
test('GIVEN memberId THEN returns "<@![memberId]>"', () => {
expect(memberNicknameMention('139836912335716352')).toBe('<@!139836912335716352>');
});
});
describe('channelMention', () => {
test('GIVEN channelId THEN returns "<#[channelId]>"', () => {
expect(channelMention('829924760309334087')).toBe('<#829924760309334087>');

View File

@@ -164,15 +164,6 @@ export function userMention<C extends Snowflake>(userId: C): `<@${C}>` {
return `<@${userId}>`;
}
/**
* Formats a user ID into a member-nickname mention
*
* @param memberId The user ID to format
*/
export function memberNicknameMention<C extends Snowflake>(memberId: C): `<@!${C}>` {
return `<@!${memberId}>`;
}
/**
* Formats a channel ID into a channel mention
*