diff --git a/src/commands/music/play.ts b/src/commands/music/play.ts new file mode 100644 index 0000000..86c461b --- /dev/null +++ b/src/commands/music/play.ts @@ -0,0 +1,23 @@ +import { SlashCommandBuilder } from "@discordjs/builders"; +import { ChatInputCommandInteraction, Client } from "discord.js"; +import { getLocalizations } from "../../utils/locales"; +import { getFilename } from "../../utils/misc"; + +export default { + scope: () => [], + + data: (client: Client) => { + const filename = getFilename(__filename); + return new SlashCommandBuilder() + .setName(filename.toLowerCase()) + .setDescription( + client.locales.get(client.config.default_lang)?.get(`c_${filename}_desc`) ?? "" + ) + .setNameLocalizations(getLocalizations(client, `c_${filename}_name`, true)) + .setDescriptionLocalizations(getLocalizations(client, `c_${filename}_desc`)); + }, + + interaction: async (interaction: ChatInputCommandInteraction, client: Client) => { + interaction.reply("coucou"); + }, +}; diff --git a/src/locales/fr.json b/src/locales/fr.json index 81a30da..8946c94 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -76,5 +76,8 @@ "c_reminder15": "Message envoyé en DM car vous avez quitté", "c_reminder16": "Message envoyé en DM car le serveur Discord n'est plus disponible.", "c_reminder17": "Message d'il y a", - "c_reminder18": "Pas de message" + "c_reminder18": "Pas de message", + + "c_play_name": "play", + "c_play_desc": "Joue une chanson/playlist" }