F
F
FUILSTANS2021-03-04 16:57:49
Node.js
FUILSTANS, 2021-03-04 16:57:49

How to put user ping in embed?

How to put a user ping in embed, I can't do it, but I have seen for example bots with hug commands and ping users in it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2021-03-04
@Azperin

The nickname is inserted into the embed using the ID <@!${user.id}> , but the notification will not come, since they are prohibited in the embed.
I sent this from the hook

Hook.send('<@!477815449195642891>', {
  embeds: [
    { 
      color: '#fc0303',
      title: `Some title`,
      description: `Some description`,
      url: `http://some.url/`,
      thumbnail: {
        url: `http://right-image-preview.com/1.png`,
      },
      image: {
        url: `http://full-image.com/2.png`,
      },
      fields: [
        {
          name: `Field 1`,
          value: `Field 1 text`,
          inline: true,
        },
        {
          name: `Field 2`,
          value: `Field 2 text`,
          inline: true,
        },
      ]
    },
  ],
}).then(m => '').catch((e) => '');

That is, he first mentions the user with the ID 477815449195642891, and below the embed. I don't know if it still works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question