i cant visit the message that i sent with getupdates in telegram bot - bots

I can't visit the message that I sent with getupdates in telegram bot
https://api.telegram.org/bot............./getupdates
how can I visit the messages that I sent with my telegram bot?
I want to show the messages that send with a bot with sendmessage method but I couldn't find it
I can find my the message_id between sent messages but I can't visit the message that bot sent

From your question I couldn't extract in which language you are coding your telegram bot.
In node.js for example, using this package, every message you sent is automatically written to the console. If you only want to review your message that should already do the trick. If you need to store it permanently you'd need to either try to find where the console.log happens and apply your own code or save the console output to a file (like mentioned here). Later on you could for example apply a regex to filter the needed messages.
Note: If you are not using any programming language yet (and are just sending to the telegram API URLs) you have no easy possibility of reviewing your sent messages apart from intercepting the HTTP packets.

Related

Send private message to a slackbot without other users of the workspace seeing it

How can i send a private message to a bot other without users seeing it on the channel?
Im using node js and the module slackbots. And each time i communicate with the bot it goes something like this: "#robot hello" but everybody on the chat sees it.
Your example is not a direct message, but a so called "mention" in a channel, which is always visible by everyone else in the same channel.
But you can also send a real direct message to a bot user. It works the same like sending a direct message to any user. e.g. click on the plus next to "Direct Messages", select the bot user from the list and click on go. Now you got a direct messaging channel with that user which is 100% private.
Your bot obviously needs to be ready to receive messages via DM in order to respond correctly. e.g if your are using Slack's Events API you need to subscribe to message.im to receive posts in the direct message channel to your bot.
Check out this help desk page on how to send direct messages.
Another approach to communicate "secretly" with your bot user in a channel is slash commands, e.g. by posting /mybot hi in a channel. Both the slash command and respond from your app will not be visible to anyone else in the channel (that is default - but can be changed).

sending direct messages from nodejs script to telegram

Is it possible to send a message from a node.js server to someone's mobile number or telegram Id directly?
is it possible without using a telegram bot?
I need an API like below:
function sendMessage(senderTelegramId, receiverTelegramId, messageText)
In short: No, without a bot no way for now.
Detailed explanation:
In order for you to send users messages on telegram you would need to create your own telegram bot. They have a well documented API which you can read and play around with.
There are 2 things you should know about sending messages to users using telegram bot:
You can't just send random people messages on telegram even if you know their phone number, to send them messages you need to have their chat_id. See how in the docs
To get the chat_id the user must first click the start button that comes up when they open your bot for the first time. Telegram will send you the chat id of that user and you save it for later when you would want to send messages to that user.
There are tons of libraries that makes working telegram bots very easy, it wouldn't take you more than an hour to get started.
I hope this answers the question, feel free to ask further questions, I have made some bots and you can also play around with them to see how it works.
Cheers )
There is actually one more easiest way to send a message to chat
just fetch the URL
https://api.telegram.org/bot[BOT_API_KEY]/sendMessage?chat_id=[MY_CHANNEL_NAME]&text=[MY_MESSAGE_TEXT]
you can find more details here
https://xabaras.medium.com/sending-a-message-to-a-telegram-channel-the-easy-way-eb0a0b32968

Facebook Messenger Chatbot messages tagging (of sorts)

I have a Facebook Messenger bot (written in NodeJS) and a separate control panel where a user can manage the information that the bot is working with (like inventory stock, etc.). One of those things is a log of all conversations between the bot and a visitor. The control panel allows the admin users to send messages to visitors through the bot. There is an input box where they can type in a message and when they click 'Send', the message goes to the bot app, which then sends it back to the user through Send API.
Messages are logged into a database; those going to the bot (from the visitor) are logged when they're received, and those the bot responds with are logged through the 'echo' callback.
The problem with this is that the bot can reply to certain visitor commands (phrases) and tries to perform certain actions based on the input. I'm using Wit.ai for this, but due to the scope of the possible phrases and keywords, the default mode when someone sends a text message is to send it to Wit.ai for processing. However, if an admin user sends the visitor a message from the control panel, the visitor could want to respond to that message (instead of sending a bot command) and that response should not go to the Wit.ai for processing. And due to the sheer scope of possible variations of what can be said, coupled with the fact that they can actually use some of the keywords in the response as well, processing the intent with Wit.ai in that case is too uncertain.
I was wondering if there's a way to somehow identify/mark the source of the messages that the bot sends to the visitor, so when an echo callback comes, I can know if it's, say, from a regular bot routine or from a user-entered reply. Like some additional meta tags that could be sent with the message that would also get returned with the echo, but that doesn't pollute the message itself. Is something like that possible? Or is there a different way I can achieve the same result.
I don't wether that helps you, but Facebook just recently integrated a quite mysterious Tag feature for bots.
https://developers.facebook.com/docs/messenger-platform/send-api-reference/tags

How to read a message from a bot via telegram API?

I have a room with a couple of bots, one of them needs to read all the messages on the room including other bot's messages.
Telegram API says bots can't see other bots message otherwise they might get caught in a "loop".
Since i really need to work around this i'm wondering if there is a known workaround?
There cannot be any workaround using the Bot APIs since the messages in getUpdates or webhook of the Bot will be from Users alone.
One workaround could be to use the telegram-cli and create a normal user as a Bot.

How to detect bot message/user message?

My FB-NodeJS-API prototype is not working correctly because my webhook is receiving the bot respond which is then sent to API.AI.
I need to set a condition where only a user's message should be received on the webhook request or only user's message should be sent to API.AI.
Can anyone advise me on this?
Can you explain the problem better? Please add the relevant code.
The bot response should go the user, not the webhook. The user input will come to the webhook.
I would suggest getting the bot to work without API.AI first and then adding support. My bot is in node.js so you may just want to jump to the source code.
For more information on setting up a bot see my article Facebook Bots for Fun and Profit
The example bot is DMS Software Bot
The source code is Github fb-robot

Resources