Embed Edit command.

Hello, there! I have one problem, i want /embed-edit "messageid" "atributes" command, but i dont know, how to make it. Please, any solution, how to make simply and fast? :/ Thanks
1 Reply
yeaz:ú
yeaz:ú2y ago
const { Client, Intents, MessageAttachment, MessageEmbed } = require('discord.js');
module.exports = {
name: "embed",
usage: '/embed <channel> <description> <title>',
options: [
{
name: 'channel',
description: "",
type: 'CHANNEL',
channelTypes: ["GUILD_TEXT"],
required: true
},
{
type: 3,
name: 'description',
description: "",
required: false,
},
{
type: 3,
name: 'title',
description: "",
required: false,
},
{
type: 3,
name: 'footer',
description: "",
required: false,
},
],
category: "Moderation",
description: "EMBED",
userPerms: ["ADMINISTRATOR"],
ownerOnly: false,
run: async (client, interaction) => {
const channel = interaction.options.getChannel("channel");
const description = interaction.options.getString('description');
const title = interaction.options.getString('title');
const footer = interaction.options.getString('footer');


const embed = new client.discord.MessageEmbed()
.setTitle(!title ? '' : title)
.setDescription(!description ? '' : description)
.setColor(client.config.embedColor)
.setFooter(!footer ? '' : footer)


await interaction.reply({ content: 'Done!', ephemeral: true });
return channel.send({ embeds: [embed], files: [icon] })

}
}
const { Client, Intents, MessageAttachment, MessageEmbed } = require('discord.js');
module.exports = {
name: "embed",
usage: '/embed <channel> <description> <title>',
options: [
{
name: 'channel',
description: "",
type: 'CHANNEL',
channelTypes: ["GUILD_TEXT"],
required: true
},
{
type: 3,
name: 'description',
description: "",
required: false,
},
{
type: 3,
name: 'title',
description: "",
required: false,
},
{
type: 3,
name: 'footer',
description: "",
required: false,
},
],
category: "Moderation",
description: "EMBED",
userPerms: ["ADMINISTRATOR"],
ownerOnly: false,
run: async (client, interaction) => {
const channel = interaction.options.getChannel("channel");
const description = interaction.options.getString('description');
const title = interaction.options.getString('title');
const footer = interaction.options.getString('footer');


const embed = new client.discord.MessageEmbed()
.setTitle(!title ? '' : title)
.setDescription(!description ? '' : description)
.setColor(client.config.embedColor)
.setFooter(!footer ? '' : footer)


await interaction.reply({ content: 'Done!', ephemeral: true });
return channel.send({ embeds: [embed], files: [icon] })

}
}
this is my command to embed.
Want results from more Discord servers?
Add your server