mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-12-22 12:11:06 +01:00
fix: run option in autocomplete instead command
This commit is contained in:
parent
c4b21275f9
commit
0c5f2d21c1
2 changed files with 1 additions and 7 deletions
|
@ -53,10 +53,5 @@ async function handleAutocomplete(interaction: AutocompleteInteraction) {
|
|||
|
||||
|
||||
const context = new AutocompleteContext(option, command, interaction);
|
||||
await Promise.resolve(command.run(context))
|
||||
.catch(async error => {
|
||||
context.respond({
|
||||
content: `Something went wrong... ${error.message} (${error.code})`
|
||||
});
|
||||
});
|
||||
await option.run(context);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { REST, Routes, SlashCommandBuilder } from "discord.js";
|
||||
import { Bubu } from "../structs/Client.ts";
|
||||
import type { Command } from "../structs/Command.ts";
|
||||
|
||||
export const COMMANDS: Map<string, Command> = new Map();
|
||||
|
|
Loading…
Reference in a new issue