tris lovely typos

This commit is contained in:
Skillz4Killz
2021-10-25 18:35:39 +00:00
committed by GitHub
parent 4d33e1f68b
commit a42ca52c06
102 changed files with 331 additions and 277 deletions
@@ -14,7 +14,7 @@ import type { Bot } from "../../../bot.ts";
* 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 createSlashCommand(bot: Bot, options: CreateGlobalApplicationCommand, guildId?: bigint) {
[options] = bot.utils.validateSlashCommands([options], true) as CreateGlobalApplicationCommand[];
[options] = bot.utils.validateSlashCommands(bot, [options], true) as CreateGlobalApplicationCommand[];
return await bot.rest.runMethod<ApplicationCommand>(
bot.rest,
@@ -3,7 +3,7 @@ import type { Bot } from "../../../bot.ts";
/** Fetches the global command for the given Id. If a guildId is provided, the guild command will be fetched. */
export async function getSlashCommand(bot: Bot, commandId: bigint, guildId?: bigint) {
const result = await bot.rest.runMethod<ApplicationCommand>(
const result = await bot.rest.runMethod<ApplicationCommand>(bot.rest,
"get",
guildId
? bot.constants.endpoints.COMMANDS_GUILD_ID(bot.applicationId, guildId, commandId)
@@ -13,6 +13,6 @@ export async function getSlashCommand(bot: Bot, commandId: bigint, guildId?: big
return {
...result,
id: bot.transformers.snowflake(result.id),
applicationId: bot.transformers.snowflake(result.applicationId),
applicationId: bot.transformers.snowflake(result.application_id),
};
}
@@ -18,7 +18,7 @@ export async function getSlashCommands(bot: Bot, guildId?: bigint) {
{
...command,
id: bot.transformers.snowflake(command.id),
applicationId: bot.transformers.snowflake(command.applicationId),
applicationId: bot.transformers.snowflake(command.application_id),
},
])
);
@@ -11,7 +11,7 @@ export async function upsertSlashCommand(
options: EditGlobalApplicationCommand,
guildId?: bigint
) {
[options] = bot.utils.validateSlashCommands([options]);
[options] = bot.utils.validateSlashCommands(bot, [options]);
return await bot.rest.runMethod<ApplicationCommand>(
bot.rest,
@@ -13,7 +13,7 @@ export async function upsertSlashCommands(
options: MakeRequired<EditGlobalApplicationCommand, "name">[],
guildId?: bigint
) {
options = bot.utils.validateSlashCommands(options) as MakeRequired<EditGlobalApplicationCommand, "name">[];
options = bot.utils.validateSlashCommands(bot, options) as MakeRequired<EditGlobalApplicationCommand, "name">[];
return await bot.rest.runMethod<ApplicationCommand[]>(
bot.rest,