add draft of play command

This commit is contained in:
Mylloon 2023-02-04 19:10:26 +01:00
parent c4347d3d7a
commit 22475d4d11
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 27 additions and 1 deletions

View file

@ -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");
},
};

View file

@ -76,5 +76,8 @@
"c_reminder15": "Message envoyé en DM car vous avez quitté", "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_reminder16": "Message envoyé en DM car le serveur Discord n'est plus disponible.",
"c_reminder17": "Message d'il y a", "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"
} }