mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: added more mature periods
This commit is contained in:
1 parent
91f364b76a
commit
91dc45c880
27 files changed
+68
-67
No files matched your search
@@ -1,10 +1,10 @@
|
||||
import { AutocompleteInteraction, CacheType } from 'discord.js';
|
||||
import { commands } from '..';
|
||||
|
||||
export default function handleAutocomplete(
|
||||
export default async function handleAutocomplete(
|
||||
interaction: AutocompleteInteraction<CacheType>,
|
||||
) {
|
||||
const command = commands[interaction.commandName];
|
||||
const command = (await commands)[interaction.commandName];
|
||||
|
||||
if (!command) {
|
||||
console.error(`No command matching ${interaction.commandName} was found.`);
|
||||
|
||||
@@ -11,7 +11,7 @@ export default async function handleButton(
|
||||
|
||||
const url = new URL(`${CYCLIC_API}/${interaction.customId}`);
|
||||
const commandName = url.pathname.split('/')[1];
|
||||
const button = commands[commandName]?.button;
|
||||
const button = (await commands)[commandName]?.button;
|
||||
|
||||
if (!button) {
|
||||
throwError(`Button handler not found for "${commandName}"`);
|
||||
|
||||
@@ -16,7 +16,7 @@ import { handleError } from '../../error';
|
||||
export default async function handleChatInputCommand(
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
) {
|
||||
const registry = commands[interaction.commandName];
|
||||
const registry = (await commands)[interaction.commandName];
|
||||
|
||||
console.log(interaction.toString());
|
||||
await interaction.deferReply();
|
||||
|
||||
Reference in new issue
Block a user