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.
Related
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
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?
I have searched the internet and I haven't found a solution to send a simple message to a specific channel. All the answers that I found were outdated. What's the newest way of sending a message to a specific channel?
I tried this but it doesn't work:
const channel = <client>.channels.cache.get('<id>');
channel.send('<content>');
a channel does not nessecairy have the send function like a voice channel. we have to check it actually is one, with the following code you should be able to:
const channel = <client>.channels.cache.get('<id>');
if(channel.isText()){
channel.send('<content>');
}
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.
I'm building a reminder bot for Discord.
The server owner or moderator should subscribe to the server via a message.
I'm having trouble finding the way to send the message to the specific server and channel.
Any idea if there is a way?
If you have the channel ID all you need to do is find the channel and send a message to it:
let channel = client.channels.get('THECHANNELID');
if(channel) {
channel.send("My Message");
}