diff --git a/commands/debugInteraction.js b/commands/debugInteraction.js new file mode 100644 index 0000000..d12cdc3 --- /dev/null +++ b/commands/debugInteraction.js @@ -0,0 +1,18 @@ +const { SlashCommandBuilder } = require("@discordjs/builders"); +const Discord = require("discord.js"); + +module.exports = { + data: new SlashCommandBuilder() + .setName("debuginteraction") + .setDescription("Console log interaction") + .addStringOption((option) => + option + .setName("message") + .setDescription("Thy message") + .setRequired(true) + ), + async execute(interaction) { + console.log(interaction); + await interaction.reply("Check logs"); + } +} \ No newline at end of file diff --git a/commands/testFeatures.js b/commands/testFeatures.js new file mode 100644 index 0000000..9774f05 --- /dev/null +++ b/commands/testFeatures.js @@ -0,0 +1,29 @@ +const { SlashCommandBuilder } = require("@discordjs/builders"); +const Discord = require("discord.js"); + +module.exports = { + data: new SlashCommandBuilder() + .setName("testfeatures") + .setDescription("Generate test embed") + .addStringOption((option) => + option + .setName("message") + .setDescription("Thy message") + .setRequired(true) + ), + async execute(interaction) { + const testEmbed = new Discord.MessageEmbed() + .setColor("#FFFFFF") + .setTitle("Test Embed") + .setDescription(`Your test message: ${interaction.options.getString('message')}`) + .setImage(interaction.user.avatarURL({dynamic : true})) + + const testRow = new Discord.MessageActionRow().addComponents( + new Discord.MessageButton() + .setCustomId('testButton') + .setLabel('Hello, this is buton') + .setStyle('DANGER') + ); + await interaction.reply({embeds: [testEmbed], components: [testRow] }); + } +} \ No newline at end of file