Moved code to src folder

This commit is contained in:
2023-11-23 12:38:55 +01:00
parent 932bce6057
commit 0eeb48b2dd
68 changed files with 59 additions and 70 deletions

View File

@@ -0,0 +1,33 @@
const { SlashCommandBuilder, PermissionFlagsBits } = require("discord.js")
module.exports = {
name: "dev-info",
description: "Test command for the bot.",
type: "slash",
data: new SlashCommandBuilder()
.setName("dev-info")
.setDescription("Test command for the bot.")
.addStringOption(option =>
option
.setName("test")
.setDescription("Test option."))
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
async execute(interaction) {
const test = interaction.options.getString("test")
const message = await interaction.channel.messages.fetch(test)
const embed = message.embeds[0]
const fields = embed.fields
const field1 = fields[0]
console.log(field1.value)
await interaction.reply({ content: "Test command.", ephemeral: true })
}
}