@discordjs/formatters
Advanced tools
Comparing version 1.0.0-dev.1736104618-9a400730f to 1.0.0-dev.1736727180-101bef1c5
@@ -327,34 +327,34 @@ import { URL } from 'node:url'; | ||
/** | ||
* Formats an application command name, subcommand group name, subcommand name, and id into an application command mention. | ||
* Formats an application command name and id into an application command mention. | ||
* | ||
* @typeParam CommandId - This is inferred by the supplied command id | ||
* @typeParam CommandName - This is inferred by the supplied command name | ||
* @typeParam SubcommandGroupName - This is inferred by the supplied subcommand group name | ||
* @typeParam SubcommandName - This is inferred by the supplied subcommand name | ||
* @typeParam CommandId - This is inferred by the supplied command id | ||
* @param commandId - The application command id to format | ||
* @param commandName - The application command name to format | ||
* @param subcommandGroupName - The subcommand group name to format | ||
* @param subcommandName - The subcommand name to format | ||
* @param commandId - The application command id to format | ||
*/ | ||
declare function chatInputApplicationCommandMention<CommandName extends string, SubcommandGroupName extends string, SubcommandName extends string, CommandId extends Snowflake>(commandName: CommandName, subcommandGroupName: SubcommandGroupName, subcommandName: SubcommandName, commandId: CommandId): `</${CommandName} ${SubcommandGroupName} ${SubcommandName}:${CommandId}>`; | ||
declare function chatInputApplicationCommandMention<CommandId extends Snowflake, CommandName extends string>(commandId: CommandId, commandName: CommandName): `</${CommandName}:${CommandId}>`; | ||
/** | ||
* Formats an application command name, subcommand name, and id into an application command mention. | ||
* | ||
* @typeParam CommandId - This is inferred by the supplied command id | ||
* @typeParam CommandName - This is inferred by the supplied command name | ||
* @typeParam SubcommandName - This is inferred by the supplied subcommand name | ||
* @typeParam CommandId - This is inferred by the supplied command id | ||
* @param commandId - The application command id to format | ||
* @param commandName - The application command name to format | ||
* @param subcommandName - The subcommand name to format | ||
* @param commandId - The application command id to format | ||
*/ | ||
declare function chatInputApplicationCommandMention<CommandName extends string, SubcommandName extends string, CommandId extends Snowflake>(commandName: CommandName, subcommandName: SubcommandName, commandId: CommandId): `</${CommandName} ${SubcommandName}:${CommandId}>`; | ||
declare function chatInputApplicationCommandMention<CommandId extends Snowflake, CommandName extends string, SubcommandName extends string>(commandId: CommandId, commandName: CommandName, subcommandName: SubcommandName): `</${CommandName} ${SubcommandName}:${CommandId}>`; | ||
/** | ||
* Formats an application command name and id into an application command mention. | ||
* Formats an application command name, subcommand group name, subcommand name, and id into an application command mention. | ||
* | ||
* @typeParam CommandId - This is inferred by the supplied command id | ||
* @typeParam CommandName - This is inferred by the supplied command name | ||
* @typeParam CommandId - This is inferred by the supplied command id | ||
* @typeParam SubcommandName - This is inferred by the supplied subcommand name | ||
* @typeParam SubcommandGroupName - This is inferred by the supplied subcommand group name | ||
* @param commandId - The application command id to format | ||
* @param commandName - The application command name to format | ||
* @param commandId - The application command id to format | ||
* @param subcommandName - The subcommand name to format | ||
* @param subcommandGroupName - The subcommand group name to format | ||
*/ | ||
declare function chatInputApplicationCommandMention<CommandName extends string, CommandId extends Snowflake>(commandName: CommandName, commandId: CommandId): `</${CommandName}:${CommandId}>`; | ||
declare function chatInputApplicationCommandMention<CommandId extends Snowflake, CommandName extends string, SubcommandName extends string, SubcommandGroupName extends string>(commandId: CommandId, commandName: CommandName, subcommandName: SubcommandName, subcommandGroupName: SubcommandGroupName): `</${CommandName} ${SubcommandGroupName} ${SubcommandName}:${CommandId}>`; | ||
/** | ||
@@ -361,0 +361,0 @@ * Formats a non-animated emoji id into a fully qualified emoji identifier. |
@@ -272,10 +272,10 @@ "use strict"; | ||
__name(linkedRoleMention, "linkedRoleMention"); | ||
function chatInputApplicationCommandMention(commandName, subcommandGroupName, subcommandName, commandId) { | ||
if (commandId !== void 0) { | ||
function chatInputApplicationCommandMention(commandId, commandName, subcommandName, subcommandGroupName) { | ||
if (subcommandGroupName !== void 0 && subcommandName !== void 0) { | ||
return `</${commandName} ${subcommandGroupName} ${subcommandName}:${commandId}>`; | ||
} | ||
if (subcommandName !== void 0) { | ||
return `</${commandName} ${subcommandGroupName}:${subcommandName}>`; | ||
return `</${commandName} ${subcommandName}:${commandId}>`; | ||
} | ||
return `</${commandName}:${subcommandGroupName}>`; | ||
return `</${commandName}:${commandId}>`; | ||
} | ||
@@ -407,3 +407,3 @@ __name(chatInputApplicationCommandMention, "chatInputApplicationCommandMention"); | ||
// src/index.ts | ||
var version = "1.0.0-dev.1736104618-9a400730f"; | ||
var version = "1.0.0-dev.1736727180-101bef1c5"; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -410,0 +410,0 @@ 0 && (module.exports = { |
{ | ||
"$schema": "https://json.schemastore.org/package.json", | ||
"name": "@discordjs/formatters", | ||
"version": "1.0.0-dev.1736104618-9a400730f", | ||
"version": "1.0.0-dev.1736727180-101bef1c5", | ||
"description": "A set of functions to format strings for Discord.", | ||
@@ -6,0 +6,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
170947