mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-10-23 17:36:26 +02:00
Merge branch 'master' into v14
commit
ad0752bf35
5 changed files with 7 additions and 3 deletions
|
@ -95,7 +95,7 @@ bot.send_message(chat_id=chat_id, text="I'm sorry Dave I'm afraid I can't do tha
|
|||
---
|
||||
#### Reply to a message
|
||||
|
||||
This is a shortcut to `bot.send_message` with sane defaults. Read more about it [in the docs](http://python-telegram-bot.readthedocs.io/en/latest/telegram.html#telegram.Message.reply_text).
|
||||
This is a shortcut to `bot.send_message` with same defaults. Read more about it [in the docs](http://python-telegram-bot.readthedocs.io/en/latest/telegram.html#telegram.Message.reply_text).
|
||||
|
||||
```python
|
||||
update.message.reply_text("I'm sorry Dave I'm afraid I can't do that.")
|
||||
|
|
|
@ -90,7 +90,7 @@ If your handlers callback returns `None` instead of the next state, you will sta
|
|||
### I want to handle updates from an external service in addition to the Telegram updates. How do I do that?
|
||||
|
||||
Receiving updates from an external service, e.g. updates about your GitHub repo, is a common use case.
|
||||
How exactly you get them sadly is beyond the scope of PTB, as that depends on the service. For many cases a simple approach is to check for updates every x seconds. You can use the [[`JobQueue`|Extensions-–-JobQueue]] for that.
|
||||
How exactly you get them sadly is beyond the scope of PTB, as that depends on the service. For many cases a simple approach is to check for updates every x seconds. You can use the [`JobQueue`](Extensions-–-JobQueue) for that.
|
||||
|
||||
If you have a setup for getting the updates, you can put them in your bots update queue via `updater.update_queue.put(your_update)`. The `update_queue` is also available as `dispatcher.update_queue` and `context.update_queue`.
|
||||
Note that `your_update` does *not* need to be an instance of `telegram.Update` - on the contrary! You can e.g. write your own custom class to represent an update from your external service.
|
||||
|
|
2
MWE.md
2
MWE.md
|
@ -4,7 +4,7 @@ If you read this, you probably were asked to provide a minimal working example (
|
|||
|
||||
So here is what that means:
|
||||
|
||||
##Example
|
||||
## Example
|
||||
|
||||
When trying to help you with a problem, it's often helpful to see your code instead of a vague description of the issue. Of course, a better description often also helps (see [[this article|Ask-Right]] on asking good technical questions).
|
||||
|
||||
|
|
|
@ -25,6 +25,9 @@ If you want to create your own persistence class, please carefully read the docs
|
|||
|
||||
If you've written a persistence class that could benefit others (e.g., a general one covering all types of data), it would be great if you linked it here or even better made it available in [ptbcontrib](https://github.com/python-telegram-bot/ptbcontrib).
|
||||
|
||||
These 3rd party packages contain persistence classes (the list is incomplete):
|
||||
* [python-telegram-bot-django-persistence](https://github.com/GamePad64/python-telegram-bot-django-persistence) - Uses Django ORM to store persistence data. It is most useful for projects, that use PTB and Django.
|
||||
|
||||
## What do I need to change?
|
||||
To make your bot persistent you need to do the following.
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ Please try to keep this page up-to-date.
|
|||
| ------- | ----------- | ----------------------------- | ------------------ |
|
||||
| [autoconv](https://github.com/Mortafix/AutoConv-Telegram-Python) | A module to build automatic and simple to manage conversation | >=13 | Alpha |
|
||||
| [django-telegrambot](https://github.com/JungDev/django-telegrambot) | A simple app to develop Telegram bots with Django | >=6.0.1 | Stable |
|
||||
| [python-telegram-bot-django-persistence](https://github.com/GamePad64/python-telegram-bot-django-persistence) | A persistence engine, that uses Django ORM as storage. No separate infrastructure needed! | >=13.7 | Beta |
|
||||
| [jackfruit](https://github.com/zzzzlzzzz/jackfruit) | A menus and forms for Telegram bots | >=12.0 | Alpha |
|
||||
| [ownbot](https://github.com/michaelimfeld/ownbot) | Ownbot provides some cool decorators to protect your command handler functions from unauthorized users! | 5.1.1 | Beta |
|
||||
| [permabots](https://github.com/jlmadurga/permabots) | Connect instant messaging bots to your APIs. https://permabots.readthedocs.org | 4.2.0 | Beta |
|
||||
|
|
Loading…
Reference in a new issue