D
D
Den182022-01-09 11:47:36
Node.js
Den18, 2022-01-09 11:47:36

How to get membera from an embed already written by a bot?

I'm trying to get a user on a successful bump through a monitoring bot.
If, after a successful Up, there is a user.tag in the embed (in the setAuthor or setFooter section), then everything successfully translates and receives its id.
Example:

let member = message.guild.members.cache.find(member => member.user.tag == message.embeds[0].author.name);

or
let member = message.guild.members.cache.find(member => member.user.tag == message.embeds[0].footer.text);

61daa11547358792723364.jpeg
But getting the user from the mention does not work.
61daa0735c14f980056972.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2022-01-12
@Den18

let member = message.guild.members.cache.find(member => message.member.user.id == m.embeds[0].description.replace(/\D+/g,""));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question