diff --git a/src/Bot.ts b/src/Bot.ts index 2e8f813..93b8019 100644 --- a/src/Bot.ts +++ b/src/Bot.ts @@ -250,15 +250,11 @@ export class Bot extends EventEmitter { process.stdout.write("Registering commands... "); await axios.put( `https://discord.com/api/v8/applications/${this.applicationId}/commands`, - this.commands - .getList() - .filter((c) => !Array.isArray(c.guilds) && c.slash) - .map((c) => c.toCommandObject()), + this.commands.list.filter((c) => !Array.isArray(c.guilds) && c.slash).map((c) => c.toCommandObject()), { headers: { Authorization: `Bot ${this.token}` } } ); const guilds: any = {}; - await this.commands - .getList() + await this.commands.list .filter((c) => Array.isArray(c.guilds) && c.guilds.length > 0) .map((c) => { c.guilds?.map(async (g) => { diff --git a/src/Help.ts b/src/Help.ts index ea622fe..8a0aee4 100644 --- a/src/Help.ts +++ b/src/Help.ts @@ -61,7 +61,7 @@ export class HelpMessage extends Command { helpMsg.setTitle(params.title); helpMsg.setDescription(params.bottomText); - cmdManager.getList().map((c) => { + cmdManager.list.map((c) => { if ( c.visible && ((Array.isArray(c.guilds) && c.guilds.length > 0 && c.guilds.find((g) => i?.guild?.id === g)) || !Array.isArray(c.guilds) || c.guilds.length === 0)