How to edit a message by its id (discord.js v.14)

I have an embed and need to edit it
10 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
! Bemep
! BemepOP3y ago
Could you help me how to completely do this? Where should I start and where should I end? I need me to write a command and edit the embed. Let's say I need to change the description I am a newbie can you help me. I'm a little confused as to how to put it all in I can send the code what i was trying to do Is the slashcommand handler for the bot to respond to commands? channel.message.edit("1038743874950135818", { embeds: [exampleEmbed]}) - here it doesn't work Here is the code, I don't know what you need here
const { EmbedBuilder } = require('discord.js');

module.exports = async (bot, message, args, argsF) => {
const exampleEmbed = new EmbedBuilder()
.setColor(0x00c0ff)
.setDescription('New description')

channel.message.edit("1038743874950135818", { embeds: [exampleEmbed]})
}

module.exports.names = ["edit"];
module.exports.interaction = {
name: 'edit',
description: 'Command description',
defaultPermission: true
};
const { EmbedBuilder } = require('discord.js');

module.exports = async (bot, message, args, argsF) => {
const exampleEmbed = new EmbedBuilder()
.setColor(0x00c0ff)
.setDescription('New description')

channel.message.edit("1038743874950135818", { embeds: [exampleEmbed]})
}

module.exports.names = ["edit"];
module.exports.interaction = {
name: 'edit',
description: 'Command description',
defaultPermission: true
};
Parogo_72
Parogo_723y ago
You should check #resources and brush up your js fundamentals. channel wont be defined by itself, and you didnt use the methods Qjuh told you
! Bemep
! BemepOP3y ago
Aw, tell me what to put where and I'll do it
Parogo_72
Parogo_723y ago
I already told you what to do You need to brush up your js
! Bemep
! BemepOP3y ago
I got it. But it's easier for you to tell me where to put it, because I'm already tired
Parogo_72
Parogo_723y ago
I mean, Qjuh literally told you every step you need to do If you want someone to write the code for you hire someone on fiverr or smt. You were given all the tools with an explanation that you would need to edit a message
! Bemep
! BemepOP3y ago
I can't do it because I don't know js. But, is it such a big job to hire someone? But, this is a small request that I ask someone. I think that they can explain it to me in more details that are more understandable to me
Parogo_72
Parogo_723y ago
You should check #rules rule 2. And as said above, check #resources and brush up your js
! Bemep
! BemepOP3y ago
I did, but it didn't work for me
Want results from more Discord servers?
Add your server