fix: name

This commit is contained in:
Skillz4Killz
2021-12-06 16:44:06 +00:00
committed by GitHub
parent c921a09420
commit c4d6e47be4
3 changed files with 5 additions and 5 deletions

View File

@@ -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",

View File

@@ -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;
}

View File

@@ -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 */