fix: doesnt commands registered, when client doesnt ready

This commit is contained in:
Slincnik 2024-12-08 18:09:44 +03:00
parent cfee30528d
commit 024822d1f3
No known key found for this signature in database

View file

@ -2,7 +2,7 @@ import differentCommands from "../utils/differentcommands.js";
export default async function registerCommands(props) {
const globalCommands = props.commands.filter(cmd => !cmd.options?.devOnly);
await registerGlobalCommands(props.client, globalCommands);
props.client.once("ready", () => registerGlobalCommands(props.client, globalCommands));
}
const registerGlobalCommands = async (client, commands) => {