Comments (2)
This issue came up before, #52
As I told them, the whole function is only a few lines of code so I'd suggest just implementing such a function yourself with your custom method for stopping. Given that the provided updates function is somewhat opinionated (how it logs errors and hardcoded time delay), it's not unreasonable to expect others to rewrite it anyway. I'd especially not like to break compatibility with older versions for a feature few people are likely to use.
from telegram-bot-api.
Oh, I see, didn't find that issue before.
The problem is, at least from what I understand, that it's not really possible to create an external method that will stop the update loop, as it starts a goroutine with an infinite loop without a break statement anywhere.
The only way would be to recreate the GetUpdatesChan
method outside the package, but that is somewhat weird, imho.
Why are you against having a stop method inside the package?
I understand the considetaion of not breaking API for existing users, but from the PR I suggested I don't see how that could happen.
Of course I might be missing something there, in that case, I'd be happy to fix that. I just think that support for new features that don't break anything for existing users, is a good thing to consider :)
from telegram-bot-api.
Related Issues (20)
- Is this project abandoned? HOT 1
- how to deploy on a paas platform with webhook HOT 2
- InlineKeyboardButton web_app HOT 4
- Show Alert
- doesn't receive updates from inline keyboard HOT 1
- Why is this repository not updated? HOT 3
- tgbotapi.NewMediaGroup function does not work correctly
- Unmarshal error for banChatMember method HOT 3
- panic in random times HOT 1
- When can we expect the next update?
- Reaction events
- Default handler processes updates out of order HOT 1
- How to banChatMember?
- Get event chat added bot?
- How do I check if a message sent from a user belongs to a media group?
- Protected content
- GetChatAdministrators docs say it doesn't return bots, but it does
- PLEASE ARCHIVE THIS PROJECT IF YOU'RE NOT GOING TO MAINTAIN IT HOT 1
- telegram bot apiv5. need inditificate command in caption under photo.
- How to create main bot menu button
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram-bot-api.