feat: refresh button

This commit is contained in:
TresAbhi committed 2023-06-25 02:32:56 +00:00
1 parent ae2d12a629
commit 58f5b894f9
30 files changed
+479 -299

No files matched your search

@@ -0,0 +1,15 @@
import { AutocompleteInteraction, CacheType } from 'discord.js';
import { commands } from '../index.js';
export default function handleAutocomplete(
interaction: AutocompleteInteraction<CacheType>,
) {
const command = commands[interaction.commandName];
if (!command) {
console.error(`No command matching ${interaction.commandName} was found.`);
return;
}
if (command.autocomplete) command.autocomplete(interaction);
}