I am interested in developing a realtime log reader in Python that can send notifications via telegram bot.
I am interested in developing a realtime log reader in Python that can send notifications via telegram bot.
Basically I want to:
Read server log in realtime
Track it for specific errors
If condition of error is met, I want program to notify me and my
team via telegram bot with specific message
If error is no longer appearing in log, I want program to notify me and my team via telegram bot with specific message
I don't know where to start. What libraries I should go through? Which technology(daemon for i.e) I should better use?
Related
I want to create a Telegram bot and use it, inside a group, as a bridge to get user messages and information, then send messages through the bot with a fake name.
So the Problem is: Bot receives the message after it's broadcasted to everyone and I should get the message and delete it, then do my stuff but this can reveal the user's identity.
I want to get the message before it's broadcasted to anyone and:
Prevent the message from broadcasting.
Bridge message through the bot and send the same message as the fake user created in my server.
Is there any other solution to use out there? except inline mode?
I need my discord bot written in PYTHON to be able to send a text chat notification about the start of the stream. I tried using webhooks in discord using the IFTTT site, but the alerts come with a huge delay. Can someone throw off some of the code for notification of streams? Thank you in advance
You can use Twitch's Eventsub to recieve a notification when a Stream goes live then modify the payload to match Discord's Webhook format and forward the payload on. Which is essentially what IFTTT does anyway.
Currently EventSub only offers a Webhook Transport. So you need a "Server" that can recieve a HTTP Post from Twitch.
Twitch EventSub is covered here https://dev.twitch.tv/docs/eventsub
Discord Webhooks is covered here https://discord.com/developers/docs/resources/webhook
If you want your Discord Bot to do it itself, then you generally would not use EventSub as you don't want your Bot process to be directly web accesable, so you'd have to poll the Streams Endpoint of the Helix API periodically and test for the Stream changing from offline to online and do whatever is needed. (Or setup a side process to recieve and internal relay the data)
You would use a Twitch App Access/Client Credentials Token, since this is a server to server request.
I'm creating a NodeJS application that should receive notifications from FCM. I've seen in the FCM documentation that you can send, but not receive notifications in the current version.
I've already searched alternatives for FCM, like pushy but seems that they have the same problem, only send notifications, not receive.
Currently I'm poling a REST api every 30 seconds to check for changes but obviously this is not the perfect scenario.
Is there any opensource or commercial solution that can receive notifications from a service, similar to firebase?
I find
https://github.com/MatthieuLemoine/push-receiver for node
and https://github.com/Francesco149/push_receiver for python
Is there a way to receive new messages that are posted in specific Telegram channels in nodejs? I.e. something similar to the twitter streaming api.
There are two or three channels that I am interested in. I want my app, written in nodejs, to get any new messages/updates/pinnedmessages that are posted in these channels (these are channels created by others, not me). My app would then perform a certain action (not on Telegram) if the new messages that were posted in the Telegram channel meet certain conditions.
Is this possible, or does this run contrary to how Telegram works?
I'm very new to node.js and sokcet.io that's why I need to ask you about the plan I have to see if it makes sense or is plain stupid. I need ongoing server/client communication for two reasons: sending real-time notifications to the user when they have one, and two, for chat between users.
Here is my plan for managing notifications:
PHP script finds out user X has a new notification.
Using Elephant.io send a message to server with user X's id as the data.
On the server side, upon receiving the message, if user X is connected emit him a message telling they have a notification.
user X's brower, Upon recieving the message, uses AJAX to poll the database and receive the text for the notification.
For chat, this is my plan (messages should be save on DB):
When user X submits a chat message to user Y, use ajax to send the text to a PHP script and save it on DB. On success, use elephant.io to send a message to user Y telling them that they have a new chat message.
User Y's browser, after receiving the server message, uses AJAX to poll a php script to receive the new text.
Do you think these plans are superior to short polling using AJAX? I appreciate any comments to improve them.
Finally,I'm curious to know how reliable these technologies (node.js, socket.io, elephant.io) are. Do they work well when the server becomes busy? How do they handle exceptions and errors ,etc.