diff --git a/commands-testing/dev-info.js b/commands-testing/dev-info.js index 6f01af0..ada9215 100644 --- a/commands-testing/dev-info.js +++ b/commands-testing/dev-info.js @@ -30,20 +30,13 @@ module.exports = { const test2 = interaction.options.getString('test2'); const test3 = interaction.options.getString('test3'); - const uuid = await getuuid(test); + const message = await interaction.channel.messages.fetch(test); + const embed = message.embeds[0]; + const fields = embed.fields; + const field1 = fields[0]; - if (uuid === null) { - await interaction.reply({ - content: 'Invalid username.', - ephemeral: true - }); - return - } - - await interaction.reply({ - content: uuid, - ephemeral: true - }); + console.log(field1.value); + await interaction.reply({ content: 'Test command.', ephemeral: true }); } }; diff --git a/commands-testing/maketestembed.js b/commands-testing/maketestembed.js new file mode 100644 index 0000000..eb92fd1 --- /dev/null +++ b/commands-testing/maketestembed.js @@ -0,0 +1,41 @@ +const { SlashCommandBuilder, PermissionFlagsBits } = require('discord.js'); + +module.exports = { + name: 'maketestembed', + description: 'Make a test embed', + type: 'slash', + + data: new SlashCommandBuilder() + .setName('maketestembed') + .setDescription('Make a test embed') + .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), + + async execute(interaction) { + + await interaction.reply({ + embeds: [{ + title: 'Test Embed', + description: 'This is a test embed', + color: 0xff0000, + fields: [ + { + name: 'Field 1', + value: 'This is field 1', + }, + { + name: 'Field 2', + value: 'This is field 2', + }, + { + name: 'Field 3', + value: 'This is field 3', + } + ], + footer: { + text: 'This is a test embed', + }, + }] + }); + + } +}