U
U
Usman Sk2021-05-05 14:34:22
Node.js
Usman Sk, 2021-05-05 14:34:22

How can a user argument be expressed via embed?

How can the user argument be expressed via embed. For now, I want to make a /fff "user" command that will send an embed message with a given value after /fff.

Example: /fff Usman Sk

"the user who sent the message" hugs Usman Sk .

Please help me, I can't figure out how to do it via embed :(


PS More details here https://discordjs.guide/creating-your-bot/commands...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-05-05
@UsmanSk

if (message.content.startsWith(prefix + "fff")) {
    let args = message.content.slice(prefix.length).trim().split(' ');

    let embed = new Discord.MessageEmbed()
        .setDescription(`${args[1]}`)

    message.channel.send(embed)
}

P.S - start learning a programming language and a lot will become clear to you.
learn.javascript.ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question