This might be a little bit complicated...
I have made on my server a report system, where if a user reacts with an "❗", this message gets reported in a channel only the owner sees. This is my code so far:
client.on("messageReactionAdd", (messageReaction, user) => {
const msg = messageReaction.message;
if (messageReaction.emoji.name == "❗") {
if (messageReaction.count > 1) {
// code missing here
} else {
const embed = new Discord.MessageEmbed()
.setColor("#ff9e00")
.setDescription("§ Report")
.setFooter(`${msg.member.user.tag}`, msg.member.user.displayAvatarURL())
.setTimestamp()
.addFields(
{name: "Message", value: `[${msg.cleanContent}](${msg.url})`, inline: false},
{name: "Amount", value: messageReaction.count, inline: true},
{name: "Channel", value: `${msg.channel.name}`, inline: true});
msg.member.guild.channels.cache.get(config.channels.report).send((embed));
}
};
});
so, everytime someone reports a message, and he was the first one reporting it, my bot will send a new bot, but I want now if a reaction is not the first, I want that the bot edits the according embed, and increases/updates the messageReaction.count.
Anyone an idea how I find the initial message without having a database?
Thanks in advance!