mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 17:00:08 +00:00
fix: name
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { ApplicationCommand } from "../../../types/interactions/commands/applicationCommand.ts";
|
||||
import type { CreateGlobalApplicationCommand } from "../../../types/interactions/commands/createGlobalApplicationCommand.ts";
|
||||
import type { CreateApplicationCommand } from "../../../types/interactions/commands/createGlobalApplicationCommand.ts";
|
||||
import type { Bot } from "../../../bot.ts";
|
||||
import { ApplicationCommandOption } from "../../../types/interactions/commands/applicationCommandOption.ts";
|
||||
|
||||
@@ -14,7 +14,7 @@ import { ApplicationCommandOption } from "../../../types/interactions/commands/a
|
||||
* Global commands are cached for **1 hour**. That means that new global commands will fan out slowly across all guilds, and will be guaranteed to be updated in an hour.
|
||||
* Guild commands update **instantly**. We recommend you use guild commands for quick testing, and global commands when they're ready for public use.
|
||||
*/
|
||||
export async function createApplicationCommand(bot: Bot, options: CreateGlobalApplicationCommand, guildId?: bigint) {
|
||||
export async function createApplicationCommand(bot: Bot, options: CreateApplicationCommand, guildId?: bigint) {
|
||||
const result = await bot.rest.runMethod<ApplicationCommand>(
|
||||
bot.rest,
|
||||
"post",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CreateGlobalApplicationCommand } from "../interactions/commands/createGlobalApplicationCommand.ts";
|
||||
import { CreateApplicationCommand } from "../interactions/commands/createGlobalApplicationCommand.ts";
|
||||
|
||||
export interface DiscordenoCreateApplicationCommand extends CreateGlobalApplicationCommand {
|
||||
export interface DiscordenoCreateApplicationCommand extends CreateApplicationCommand {
|
||||
/** Id of the guild to create a guild only application command */
|
||||
guildId: string;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ApplicationCommandOption } from "./applicationCommandOption.ts";
|
||||
import { ApplicationCommandTypes } from "./applicationCommandTypes.ts";
|
||||
|
||||
/** https://discord.com/developers/docs/interactions/slash-commands#create-global-application-command-json-params */
|
||||
export interface CreateGlobalApplicationCommand {
|
||||
export interface CreateApplicationCommand {
|
||||
/** 1-31 character name matching lowercase `^[\w-]{1,32}$` */
|
||||
name: string;
|
||||
/** 1-100 character description */
|
||||
|
||||
Reference in New Issue
Block a user