specify that data need the client

This commit is contained in:
Mylloon 2022-07-24 15:43:20 +02:00
parent f1622fa7e4
commit 743d6eb471
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -29,7 +29,7 @@ declare module 'discord.js' {
/** Command itself */ /** Command itself */
{ {
/** Data about the command */ /** Data about the command */
data: SlashCommandBuilder, data(client: Client): SlashCommandBuilder,
/** How the command interact */ /** How the command interact */
interaction: (interaction: CommandInteraction, client: Client) => unknown interaction: (interaction: CommandInteraction, client: Client) => unknown
} }
@ -54,8 +54,10 @@ export default async () => {
default_lang: process.env.DEFAULT_LANG ?? 'fr', default_lang: process.env.DEFAULT_LANG ?? 'fr',
}; };
client.commands.categories = new Collection(); client.commands = {
client.commands.list = new Collection(); categories: new Collection(),
list: new Collection(),
};
console.log('Translations progression :'); console.log('Translations progression :');
client.locales = await loadLocales(client.config.default_lang); client.locales = await loadLocales(client.config.default_lang);