A powerful and extendable Discord bot, with it's own module system :3 thevoid.cafe/projects/voidy

✨ Add "log" command for debugging

Jo 5ddb29f3 135d9f24

+22
+22
src/features/chatbot/commands/log.ts
··· 1 + import { SlashCommandBuilder } from "discord.js"; 2 + import { Command } from "../../../utils/classes/Command.ts"; 3 + 4 + export default new Command({ 5 + data: new SlashCommandBuilder() 6 + .setName("log") 7 + .setDescription("Make the bot log any message.") 8 + .addStringOption((option) => option 9 + .setName("message") 10 + .setDescription("The message you'd like to send.") 11 + .setRequired(true)), 12 + execute(interaction) { 13 + const { options } = interaction; 14 + 15 + console.log(options.getString("message")); 16 + 17 + interaction.reply({ 18 + content: "Successfully sent message to the logs :3", 19 + flags: ["Ephemeral"] 20 + }) 21 + }, 22 + });