Telegram bot: uploading new features without rebooting bot - telegram-bot

I have telegram bot written in Python with lot's of users. The question is: when I do some changes (for example adding new inline buttons to bot) all users need to reset it or to use '/start' command. How to make this process hidden, not to ask all users do it? Maybe there is a variant, when bot restarts itself by schedule? Every suggestion will be really valuable for me....

Related

How to connect two telegram bots between each other?

I'm new in telegram bots and I wanted that one bot sends messages to a chat and another bot reads the messages, filters it and sends filtered messages to me.
I read related articles here, but I haven't found any appropriate solution.
I read that it isn't possible to create transfering messages between two bots because one can't see messages from another.
But still I haven't found final answer here.
Can you help me, is it possible or not?
And if it's possible, how to connect one bot to another?
You can't do that or rather you're not allowed to. Because it will create an infinite loop between both the bots.
To avoid that Telegram bot has some restrictions.
It can't reach to someone unless they have messaged the bot previously. So, theoretically it is impossible.

Getting started creating a web form in Microsoft Teams

I dont know where to begin. Do I need to create an app? Do I need to use bots? I have tried finding docs online but don't know where to start. Any help with be appreciated.
I am trying to create a small form in a teams channel that my users will fill out.
User enters #projects
Web server responds with
User clicks submit and data gets posted to my web server.
You're correct that there are a few different kinds of applications in Teams, so finding the one that suits your needs can be a little confusing at first. For what you're trying to do, I would recommend a Bot, and when it received a message (which it will do when it receives your #mention), it can respond with an Adaptive Cards. Adaptive Cards, if you've not used them, are like small embedded forms inside the chat. The user can complete the card and click a button, and it will send the payload back to your bot to do whatever it needs.
Bots, incidentally, are basically just web services, so your bot can do whatever it needs once it received the payload, such as calling another API in turn.
You haven't mentioned what language you might want to work in, but here are some good starting point nevertheless:
https://dev.botframework.com/
https://github.com/microsoft/BotBuilder-Samples/tree/main/samples
https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore/57.teams-conversation-bot (I've linked the C# version - you should know that Teams bots use the same Microsoft framework as -all- bots build for the Microsoft world, such as web chat bot or a Skype bot. As a result, you have to ensure that anything you look at is applicable to Teams as some content/samples are not)
https://adaptivecards.io/ (as with Bots, Adaptive Cards have a life outside of Teams, so some articles/content/etc. might not be applicable to your scenario)

Telegram bot and the method getUpdates

I have a question about Telegram bot, I created a bot some weeks ago, it works fine but there is a strange behavior with the method getUpdates; indeed if I use the link:
https://api.telegram.org/bot<token>/getUpdates
now I can't see any message, but if I start a new bot this link works fine like the first day when I created the other bot.
There is a particular interval of time after which this link stops working?
There is a way to re-enable it?
Thanks in advance
From Telegram Bot API documentations:
Incoming updates are stored on the server until the bot receives them
... but they will not be kept longer than 24 hours.
So, getUpdates did not stop working. Old messages got deleted after a finite amount of time.
Use #BOtFather And /revoke command to Get New Token for your bot.
I had an issue with my bot API were it mysteriously crashes. I found it was due to it returning this HTML page instead of a JSON string very rarely. Even though the getUpdates interval was a fair 3 seconds. I've patched an update not long ago.
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.10.1</center>
</body>
</html>
The only time the bot token becomes useless is when it's been manually /revoke on BotFather on the target bot.
If you still having issues. You could try my TelegramBot class that uses the getUpdates method that should be easy to use. I have no issues running my bot on Android and Windows 10 Node.js servers. https://github.com/NightfallAlicorn/telegrambot-nodejs-getupdates Be aware it's not 100% complete but it's stable and has all functionalities except inline bot stuff.
It can happen if someone get updates already. Maybe your bot is running somewhere. I also had this problem when the bot was not running for me, but something still received these updates. I think it will help you to get a new access token via /revoke in #BotFather, after that everything work good in my case.

Is it possible to mark the message thread with 'unseen=0'?

I work on Google Chrome extension for facebook.
I have a button and if you click on it, a popup with latest active threads appears. I want to say to facebook server that no threads are 'unseen' afterwards. So that the messages jewel on Facebook main page will show no notifications.
Can I do this with Graph API? POST calls to graph.facebook.com/thread_id with unseen=0 don't work.
Alternatives?
You do not have write access to the inbox. Only read access read_mailbox. Sorry, but that's the only permission that Facebook currently has available. See: https://developers.facebook.com/docs/reference/api/permissions/
However, you can keep track of the inbox items on a remote server's data store and have your plugin query that to know what's been "seen". So at least from your plugin's perspective, things are showing up correctly.

How to get in touch with the users of your WP7 apps?

This is a problem that every developer will face when building their apps: how to contact the reviewer of your app to notify them of an update, new release, help topics, etc?
Some things I am thinking:
Include an RSS feed in your app which you can update to notify the users of the app.
Include a twitter feed regarding your app. How to go about this?
Include a way for the users to subscribe to a mailing list. This way, I can send a mass-email to the users who opted-in? Any suggestions here?
Any other ways that you think this can/should be done? Any existing solutions you can point me to will be great. Thanks in advance.
One way, for contacting a specific user who created a review of an application is to go to Zune Social (at http://social.zune.net/home) and create a new message. You can then enter the Zune Tag of the user who created a review.
Personally, I'd try to do all three - have a web page/site, with an RSS feed, and a subscription link (so they can subscribe to the RSS feed via email) and then post any updates to your twitter account as well.
You can't really force a user to do any of these, but having the options available, and linked from inside your app on the about page is probably good practise.
You could also include some kind of "Update Available" feature inside the application. Try to make this as unobtrusive as possible obviously. Obviously if they've still got the app installed they'll get an update notification from the marketplace anyway.
Sam
Besides the suggestions made by samjudson, I'll also recommend having a support-page with a direct option to send a email to you. Here's a example of a support-page from one of my applications. I've received lot of emails with suggestions for improvements, or complains about bugs. And since it's by email, it gives you the option to respond directly to people.
Another thing about reviews. Don't take them to serious. Most people only rate negatively (since humans like to complain), and by such a lot of reviews are often misinformed, outdated, or the users just been plain ignorant.