DiscordJS | Copy embed message to another chat - javascript

I made a synchronization of a form with a discord hook and in it there are 3 reactions that an external BOT puts, inside these reactions I wanted to make that when one is selected, have a confirmation and if the confirmation is yes, the BOT sends the embed message to another embed chat as well.
The reactions are already being placed automatically, but I am not able to know how to copy the embed message to send in another chat depending on the reactions chosen in JS.

Simply grab the content and embeds from the message, and send it somewhere else.
//channel is a TextChannel instance, message is a Message instance
const { content, embeds } = message
channel.send({
content,
embeds
})
Note that channel is the target channel where you want to send the copied the message

Related

How i can make Discord bot that will check player's inventory Fortnite with node.js

First i know that should to get authorization code.
I put client id into the link and click it. I don't know how to get client id, i've used another discord bot.
Next i get auth id and input it in discord chat while bot listening and it show me detailed stats:
avatar, lvl, skins, gliders, seasons etc.
I wanna it be like this
What api should i use and how?

Is it possible for a Discord bot to respond on a message that I reply to?

Is it possible for a bot to find a message I want to reply to and add reactions to it?
Currently, I need to copy the message ID I want to reply to and send it to the bot so it knows where to add reactions. But the message IDs are long, not everybody got developer mode enabled and I simply want to be able to just show the bot where to add reaction instead of copy paste the message ID.
Here I want bot (by replying to message "example" and calling bot function "react") to react with letter emojis spelling "test" on selected message.

How do I block the use of #everyone and #here? with discord.js

I want to make my bot block #everyone and #here and send a "u need admin role to do that" message
but still allow certain roles to use #everyone and #here
Your bot can only catch messages after they send - this means everyone would still get an annoying ping from the person using #everyone, then the message would go away. Only a half measure.
Restricting #everyone/#here to certain roles is possible in normal Discord (since this tutorial was created, the role permission was changed to "Mention #everyone, #here and All Roles").
When you've done this and someone types #everyone, it will be treated like any other message. Here's an an image of my testing: Notice only one of the messages has the gold highlight: that was the time the account had the permission to send #everyone messages.

Link to message posted by Bot in MSTeams

How can I get the link( which I got on clicking the 3 dots of a message) of all messages posted to the channel by my bot?
After getting this link, I want to DM the link to the user through the bot.
You can take a look at list channel messages API. This will give you the message_id and channel _id later you can try to deep link https://teams.microsoft.com/l/message/{channel_id}/{message_id} to same message using message id or channel. There is also alternate solution for this, subscribe to channel using change notification API. You will be getting all the messages of channel to notification endpoint, you can Deserialize the message payload you will find the copy link url in the payload it self.

How to create a log channel command?

I want to add a new command to my bot, a command that will send the log messages of the guild to the mentioned channel.
Use:
!logs #channel
I also want it to be a specific type of log to a different channel.
Use:
!logs ban-msg #channel
!logs delete-msg #channel
I don't need the second option but I do want it.
The question asked requires a long study; Discord does not provide any simple solution. To make such functionality you need:
Create a database in which event data will be recorded ("_id","event","channel_id")
Next, you can handle discord Events to determine the event, then pass it through the database, see if the channel is set in the database for posting this event, if so - then send a specific embed to the specified channel.

Categories