Update Formatters.js
This commit is contained in:
parent
b05e611875
commit
a0c7752ed2
@ -18,7 +18,6 @@ const {
|
|||||||
TimestampStyles,
|
TimestampStyles,
|
||||||
underscore,
|
underscore,
|
||||||
userMention,
|
userMention,
|
||||||
chatInputApplicationCommandMention,
|
|
||||||
} = require('@discordjs/builders');
|
} = require('@discordjs/builders');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,7 +65,22 @@ Formatters.channelMention = channelMention;
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
Formatters.chatInputApplicationCommandMention = chatInputApplicationCommandMention;
|
Formatters.chatInputApplicationCommandMention = function chatInputApplicationCommandMention(
|
||||||
|
commandName,
|
||||||
|
subcommandGroupOrSubOrId,
|
||||||
|
subcommandNameOrId,
|
||||||
|
commandId,
|
||||||
|
) {
|
||||||
|
if (typeof commandId !== 'undefined') {
|
||||||
|
return `</${commandName} ${subcommandGroupOrSubOrId} ${subcommandNameOrId}:${commandId}>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof subcommandNameOrId !== 'undefined') {
|
||||||
|
return `</${commandName} ${subcommandGroupOrSubOrId}:${subcommandNameOrId}>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return `</${commandName}:${subcommandGroupOrSubOrId}>`;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wraps the content inside a code block with an optional language.
|
* Wraps the content inside a code block with an optional language.
|
||||||
|
Loading…
Reference in New Issue
Block a user