Control Telegram Bot via API (send message to bot programmatically) - telegram-bot

I have a raspberry pi at home with motion detection. I have set the PI up to send me alerts (and pictures) via a Telegram Bot. That all works fine.
I can also (manually) type into the chat, "Home" or "Away" to activate or deactivate the motion detection. I want to automate the sending of the "Home" and "Away" messages (using tasker) when I leave/join my home wifi.
Short of making my own App, is there any way to hack this into place? I was playing around with trying to set the chat description and then query it, as a workaround, but I don't think that'll work for a private chat.
If there's a hack around, I'd love to hear it.

You can use cURL command with HTTP API, you might need sendMessage or editMessageText method.
e.g. curl "https://api.telegram.org/botTOKEN/sendMessage?chat_id=109780439&text=Away"

Related

Where does the API call from the interactive card in Google Chat go?

I am trying to replicate examples from the Google Docs about Creating interactive cards in Google Chat. I have created a sample link in my card.
Sample card with a link "click me"
But once I hit "click me" I have no idea where the request goes and how to steer that it's routed to my publicly available Node.js express route on Google Cloud run.
I must have missed something about the basic bot communication. Can you help me? (Background. I am sending my card via a simple webhook at this point.)
I have found out, that my implementation was not suitable for interactive cards. If someone clicks an interactive card Google Chat will notify the creating bot at its API point specified in the Google Cloud configuration.
So posting the card via WebHook is possible. But there is not communication channel back in this scenario.
I resolved my issue by implementing it with a proper Google Chat bot.

Reacting to discord notifications from another app

I would like to know if there's any way to read notifications from discord app to be able to fire actions on my computer. I have been looking for information about action center in windows 10 but it seems there is no public api to access all notifications in the action center just the ones from your app.
On the other hand I have been using WireShark to check the network traffic but it is encripted so, there's no way (that I know) to check the decripted notification message.
I can't use a discord bot to do this. It must be done in my desktop machine.
Is it possible to do this?

Create custom chat control for bot framework

I'm using Microsoft Bot emulator to test or debug the chat API developed via Bot framework.
Now, i'm going to host the service in my IIS server, but i would like to know how to write client application to this?. We cant use emulator in realtime, we need to provide user a chat window & enter button.
I'm not getting any example projects on how to create chat window for bot API. Is there a way to do it?
Have you registered your bot on Microsoft Bot Framework website yet?
When you are done with this process, there are plenty of channels (Facebook,Skype, etc.) to use in order to talk to your bot. One of them is a simple web client.
How to register a bot: Register a bot
How to connect your bot to channels: Connect a bot to channels
If you would like a custom chat control please see the WebChat control. It is an open source project you can customize and modify to suit your needs. You can embed it anywhere you like.

Snapchat API (E.g. auto accept friend requests?)

I was wondering if the SnapChat API allows for auto accepting of friend requests. I know the API exists but I can't seem to find any docs on it anywhere, does anyone know where SnapChat releases these? I have like 6,000 friend requests and don't want to accept them all by hand lol!
There is not a public API available, but there is a few unofficial API's released. The most documented one is here, http://gibsonsec.org/snapchat/fulldisclosure/ , I am developing a few applications with the use of this that incorporate snapchat. TO auto accept friend requests, you would need to listen for them in the snapchat update that are pushed to the client, then as you parse it the tag for a friend request would be under MEDIA with the value 3. Then just send the accept back. If you want something like a macro to go through your current requests then get a macro application on android if you are running android, you need a root though for these. So i suggest downloading Bluestacks on the pc which is a android simulator where you can download any app and run it. Download snapchat for it and run a macro on your computer.

How can I access the Google+ hangout chat?

I want to implement a speaker queue manager that works off of the chat - see GitHub repo Q Bot for more details - but are unable to find a way to listen to chat events (and then react to them). Any hints?
There's no way to access chat from the Hangouts API.
There is, however, an open feature request for this. If you star the issue you'll be notified when it's updated.
You might be able to work around this by making your own interface in a Hangout extension to control the inputs for this app, rather than overloading the chat feature.