This commit is contained in:
Mylloon 2022-07-24 16:30:23 +02:00
parent 45bfc899a4
commit 707b13c066
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -66,10 +66,15 @@ export default {
data: (client: Client) => { data: (client: Client) => {
const filename = getFilename(__filename); const filename = getFilename(__filename);
return new SlashCommandBuilder() return new SlashCommandBuilder()
.setName(filename.toLowerCase()) .setName(
.setDescription(client.locales.get(client.config.default_lang)?.get(`c_${filename}_desc`) ?? '') filename.toLowerCase())
.setNameLocalizations(getLocalizations(client, `c_${filename}_name`, true)) .setDescription(client.locales.get(client.config.default_lang)
.setDescriptionLocalizations(getLocalizations(client, `c_${filename}_desc`)); ?.get(`c_${filename}_desc`) ?? '')
.setNameLocalizations(
getLocalizations(client, `c_${filename}_name`, true))
.setDescriptionLocalizations(
getLocalizations(client, `c_${filename}_desc`)
);
}, },
interaction: async (interaction: CommandInteraction, client: Client) => { interaction: async (interaction: CommandInteraction, client: Client) => {