feat: add linked roles formatters (#10461)

* feat: add linked roles formatters

* docs: requested changes

Co-authored-by: Almeida <github@almeidx.dev>

* docs: remove locale

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Danial Raza
2024-10-06 16:19:50 +02:00
committed by GitHub
parent 12e510671b
commit 04df3c4130
2 changed files with 21 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ import {
hyperlink,
inlineCode,
italic,
linkedRoleMention,
messageLink,
orderedList,
quote,
@@ -145,6 +146,12 @@ describe('Message formatters', () => {
});
});
describe('linkedRoleMention', () => {
test('GIVEN roleId THEN returns "<id:linked-roles:[roleId]>"', () => {
expect(linkedRoleMention('815434166602170409')).toEqual('<id:linked-roles:815434166602170409>');
});
});
describe('chatInputApplicationCommandMention', () => {
test('GIVEN commandName and commandId THEN returns "</[commandName]:[commandId]>"', () => {
expect(chatInputApplicationCommandMention('airhorn', '815434166602170409')).toEqual(