Fix some links manually

Hinrich Mahler 2021-10-24 11:13:36 +02:00
parent 733d784595
commit 67b45bd835
6 changed files with 10 additions and 10 deletions

@ -33,7 +33,7 @@ If you need more details on MQ implementation, [follow its docs](http://python-t
### Using MQ with @queuedmessage decorator
[`MessageQueue`](http://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.messagequeue.html) module includes a convenient `@queuedmessage` decorator, which allows to delegate the required send method calls to MQ. However, it requires you to do a little work by hand, mainly create a [`telegram.Bot`](http://python-telegram-bot.readthedocs.io/en/latest/telegram.bot.html) subclass and decorate those methods.
Below is listed the example of its usage, which is based on echo bot from our [[Tutorial|Extensions-%E2%80%93-Your-first-Bot#your-first-bot-step-by-step]]. Trace through it (it's self-explanatory enough) and try experimenting with it on your own. Don't forget to look at the [`MessageQueue` docs](http://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.messagequeue.html) at the same time to clarify the dark corners. It's important that you properly understand how MQ works before using it.
Below is listed the example of its usage, which is based on echo bot from our [[Tutorial|Extensions--Your-first-Bot#your-first-bot-step-by-step]]. Trace through it (it's self-explanatory enough) and try experimenting with it on your own. Don't forget to look at the [`MessageQueue` docs](http://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.messagequeue.html) at the same time to clarify the dark corners. It's important that you properly understand how MQ works before using it.
```python
#!/usr/bin/env python3

@ -53,7 +53,7 @@ It is also a follow-up to the page [[Introduction to the API|Introduction-to-the
#### Fetch updates
To fetch messages sent to your Bot, you can use the [getUpdates](https://core.telegram.org/bots/api#getupdates) API method.
**Note:** You don't have to use `get_updates` if you are writing your bot with the `telegram.ext` submodule, since `telegram.ext.Updater` takes care of fetching all updates for you. Read more about that [[here|Extensions-%E2%80%93-Your-first-Bot]].
**Note:** You don't have to use `get_updates` if you are writing your bot with the `telegram.ext` submodule, since `telegram.ext.Updater` takes care of fetching all updates for you. Read more about that [[here|Extensions--Your-first-Bot]].
```python
updates = bot.get_updates()

@ -83,7 +83,7 @@ From now on, your bot should echo all non-command messages it receives.
**Note:** As soon as you add new handlers to `dispatcher`, they are in effect.
**Note:** The `Filters` class contains a number of so called filters that filter incoming messages for text, images, status updates and more. Any message that returns `True` for at least one of the filters passed to `MessageHandler` will be accepted. You can also write your own filters if you want. See more in [[Advanced Filters|Extensions-%E2%80%93-Advanced-Filters]].
**Note:** The `Filters` class contains a number of so called filters that filter incoming messages for text, images, status updates and more. Any message that returns `True` for at least one of the filters passed to `MessageHandler` will be accepted. You can also write your own filters if you want. See more in [[Advanced Filters|Extensions--Advanced-Filters]].
Let's add some actual functionality to your bot. We want to implement a `/caps` command that will take some text as an argument and reply to it in CAPS. To make things easy, you can receive the arguments (as a `list`, split on spaces) that were passed to a command in the callback function:
@ -151,4 +151,4 @@ Have a look at the ready-to-run [examples](https://github.com/python-telegram-bo
Learn about the library exceptions and best practices in [[Exception Handling|Exception-Handling]].
You want *more features*? Check out [[Extensions JobQueue|Extensions-%E2%80%93-JobQueue]]!
You want *more features*? Check out [[Extensions JobQueue|Extensions--JobQueue]]!

@ -80,7 +80,7 @@ Anything *not* listed there can not be done with bots. Here is a short list of f
* Adding members to a group/channel (note that you can just send an invite link, which is also less likely to be seen as spam)
* Clearing the chat history for a user
* Getting a message by its `message_id` (For the interested reader: see [here](https://github.com/tdlib/telegram-bot-api/issues/62))
* Getting the last sent message in a chat (you can keep track of that by using [[`chat_data`|Storing-bot,-user-and-chat-related-data]])
* Getting the last sent message in a chat (you can keep track of that by using [`chat_data`](Storing-bot,-user-and-chat-related-data))
In some cases, using a userbot can help overcome restrictions of the Bot API. Please have a look at this [article](http://telegra.ph/How-a-Userbot-superacharges-your-Telegram-Bot-07-09) about userbots.
Note that userbots are not what python-telegram-bot is for.

@ -1,5 +1,5 @@
## JobQueue
We did some serious work on the `telegram.ext.JobQueue` class. The changes are similar to the changes made to the `telegram.ext.Dispatcher` class in version 4. The [[Extensions JobQueue|Extensions-%E2%80%93-JobQueue]] article has been updated with the changes.
We did some serious work on the `telegram.ext.JobQueue` class. The changes are similar to the changes made to the `telegram.ext.Dispatcher` class in version 4. The [[Extensions JobQueue|Extensions--JobQueue]] article has been updated with the changes.
## Botan
Botan was moved from `telegram.utils.botan` to `telegram.contrib.botan`

@ -1,19 +1,19 @@
## Must read
1. [[Introduction to the API|Introduction-to-the-API]]
2. [[Tutorial: Your first bot|Extensions-%E2%80%93-Your-first-Bot]]
2. [[Tutorial: Your first bot|Extensions--Your-first-Bot]]
3. [[FAQ|Frequently-Asked-Questions]]
4. [[How to ask good questions|Ask-Right]]
5. [[How to write an MWE|MWE]]
## PTB Features
1. [[Types of Handlers|Types-Of-Handlers]]
2. [[Advanced Filters|Extensions-%E2%80%93-Advanced-Filters]]
2. [[Advanced Filters|Extensions--Advanced-Filters]]
3. [[Storing data|Storing-bot,-user-and-chat-related-data]]
4. [[Making your bot persistent|Making-your-bot-persistent]]
5. [[Adding Defaults|Adding-defaults-to-your-bot]]
6. [[Exception Handling|Exception-Handling]]
7. [[Job Queue|Extensions-%E2%80%93-JobQueue]]
8. [[Arbitrary `callback_data`|Arbitrary-callback_data]]
7. [[Job Queue|Extensions--JobQueue]]
8. [Arbitrary `callback_data`](Arbitrary-callback_data)
9. [[Avoiding flood limits|Avoiding-flood-limits]]
## Code Resources