Embed the command "say"

Hi, I’m using this code to say stuff :
if(command === “say”) {

const sayMessage = args.join(" ");

message.delete().catch(O_o=>{}); 

message.channel.send(sayMessage);

Does anyone know how to make it embed? Like send it embeded and like have a thing at the bottom saying who sent the message? Like who used the say command? Sorry if it isn’t clear , I don’t speak english often so I’m ad

Instead of this, try:

message.channel.send({embed: {
    author: {
        name: message.author.tag,
        icon_url: message.author.avatarURL
    },
    color: 65535,
    description: sayMessage
}});

so change the whole thing into that?

No, just replace the part I quoted with that.

Yo thanks! You saved me

Wait could you make it like put my username to the bottom instead of the top? It doesn’t rlly look good
(No hate tho, the code is amazing and the effort)

Like “Sent by {user}” ?

Sure, would you like their profile picture there as well? I don’t think it looks as good in the footer.

You choose , whatever you prefer and whatever looks good

With profile picture:

message.channel.send({embed: {
    footer: {
        text: "Sent by: " + message.author.tag,
        icon_url: message.author.avatarURL
    },
    color: 65535,
    description: sayMessage
}});

Without profile picture:

message.channel.send({embed: {
    footer: {
        text: "Sent by: " + message.author.tag
    },
    color: 65535,
    description: sayMessage
}});

Thank you! :heart: :joy:

Also, just so you can do this for yourself, I’d recommend checking out this website. It’s an embed visualizer so you can try making embeds yourself.

https://leovoel.github.io/embed-visualizer/

1 Like