mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-22 15:53:08 +02:00
fix: cache commands at startup
This commit is contained in:
parent
aeb4450a56
commit
26329453ed
@ -27,7 +27,7 @@ module.exports = class ClaimSlashCommand extends SlashCommand {
|
||||
const staff = await isStaff(interaction.guild, interaction.member.id);
|
||||
const settings = await client.prisma.guild.findUnique({ where: { id: interaction.guild.id } });
|
||||
const getMessage = client.i18n.getLocale(settings.locale);
|
||||
const commands = (await client.application.commands.fetch())
|
||||
const commands = client.application.commands.cache
|
||||
.filter(c => c.type === 1)
|
||||
.map(c => `> </${c.name}:${c.id}>: ${c.description}`)
|
||||
.join('\n');
|
||||
|
@ -34,6 +34,9 @@ module.exports = class extends Listener {
|
||||
.catch(client.log.error);
|
||||
}
|
||||
|
||||
// commands are not cached automatically
|
||||
await client.application.commands.fetch();
|
||||
|
||||
// presence/activity
|
||||
let next = 0;
|
||||
const setPresence = async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user