refactor(helpers): rename executeSlashCommand to sendInteractionResponse (#676)

This commit is contained in:
ayntee
2021-03-17 15:28:44 +04:00
committed by GitHub
parent 314bef2055
commit eba5679806
4 changed files with 7 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ import { endpoints } from "../../util/constants.ts";
*
* NOTE: By default we will suppress mentions. To enable mentions, just pass any mentions object.
*/
export async function executeSlashCommand(
export async function sendInteractionResponse(
id: string,
token: string,
options: SlashCommandResponseOptions,

View File

@@ -17,9 +17,9 @@ import { createSlashCommand } from "./commands/create_slash_command.ts";
import { deleteSlashCommand } from "./commands/delete_slash_command.ts";
import { deleteSlashResponse } from "./commands/delete_slash_response.ts";
import { editSlashResponse } from "./commands/edit_slash_response.ts";
import { executeSlashCommand } from "./commands/execute_slash_command.ts";
import { getSlashCommand } from "./commands/get_slash_command.ts";
import { getSlashCommands } from "./commands/get_slash_commands.ts";
import { sendInteractionResponse } from "./commands/send_interaction_response.ts";
import { upsertSlashCommand } from "./commands/upsert_slash_command.ts";
import { upsertSlashCommands } from "./commands/upsert_slash_commands.ts";
import { createEmoji } from "./emojis/create_emoji.ts";
@@ -168,7 +168,6 @@ export {
editWebhookWithToken,
editWidget,
emojiURL,
executeSlashCommand,
executeWebhook,
fetchMembers,
followChannel,
@@ -229,6 +228,7 @@ export {
removeRole,
removeUserReaction,
sendDirectMessage,
sendInteractionResponse,
sendMessage,
startTyping,
swapChannels,
@@ -264,7 +264,7 @@ export let helpers = {
deleteSlashCommand,
deleteSlashResponse,
editSlashResponse,
executeSlashCommand,
sendInteractionResponse,
getSlashCommand,
getSlashCommands,
upsertSlashCommand,

View File

@@ -70,7 +70,7 @@ export interface EditSlashCommandOptions {
guildID?: string;
}
export interface ExecuteSlashCommandOptions {
export interface SendInteractionResponseOptions {
type: InteractionResponseType;
data: SlashCommandCallbackData;
}

View File

@@ -215,13 +215,13 @@ export interface EditSlashCommandOptions {
options?: SlashCommandOption[];
}
export interface ExecuteSlashCommandOptions {
export interface SendInteractionResponseOptions {
type: InteractionResponseType;
data: SlashCommandCallbackData;
}
export interface SlashCommandResponseOptions
extends ExecuteSlashCommandOptions {
extends SendInteractionResponseOptions {
/** Whether to make this response visible ONLY to the user who used this command. It will also be deleted after some time. */
private?: boolean;
}