diff --git a/data/web/blogfork.telegram.org/bots/features.html b/data/web/blogfork.telegram.org/bots/features.html index e63df866eb..29241b1c71 100644 --- a/data/web/blogfork.telegram.org/bots/features.html +++ b/data/web/blogfork.telegram.org/bots/features.html @@ -358,12 +358,20 @@ width=44% />

This mode not only increases user privacy, but also makes the bot more efficient by reducing the number of inputs it needs to process. Users can always see a bot’s current privacy setting in the list of group members.

Testing your bot

-

To quickly test your bot without interfering with its users, you can simply run another instance of your code with a different token. You would then privately interact and run your benchmarks on the bot associated with the new token.

+

You can quickly test your bot without interfering with its users by simply running another instance of your code on a different bot account. To do so, create a new bot via @BotFather, obtain its token and use it in the testing instance of your code.

+

All further testing and debugging can happen privately on the new bot, without affecting the original instance.

If you need to share file references across bots, note that the file_id field is tied to a single bot id, so your test instance cannot use a shared file_id database to quickly send media – files must be individually reuploaded.

Dedicated test environment

-

Telegram also offers a dedicated test environment suitable for more advanced testing. Bots and users in this environment generally unlock expedited limits and more flexible restrictions – for example, you can test topics without needing 200 users in your group.

+

Telegram also offers a dedicated test environment suitable for more advanced testing. Bots and users in this environment generally have more flexible restrictions – for example:

+ +
+

Flood limits are not raised in the test environment, and may at times be stricter. To minimize how this impacts your bot, you should make sure that it handles errors with retry policies and does not depend on hardcoded limit values.

+

Creating a bot in the test environment

The test environment is completely separate from the main environment, so you will need to create a new user account and a new bot with @BotFather.

To create an account and log in, use either of the following:

@@ -375,7 +383,7 @@ width=44% />

After logging in, simply create a new bot following the standard procedure and send your requests to the Test Bot API in this format:

https://api.telegram.org/bot<token>/test/METHOD_NAME
-

When working with the test environment, you may use HTTP links without TLS to test your Web Apps.

+

When working with the test environment, you may use HTTP links without TLS in the url field of both LoginUrl and WebAppInfo.

Status alerts

Millions choose Telegram for its speed. To best benefit users, your bot also needs to be responsive. In order to help developers keep their bots in shape, @BotFather will send status alerts if it sees something is wrong.

diff --git a/data/web/core.telegram.org/bots/features.html b/data/web/core.telegram.org/bots/features.html index 85d39d5a35..7023924f99 100644 --- a/data/web/core.telegram.org/bots/features.html +++ b/data/web/core.telegram.org/bots/features.html @@ -358,12 +358,20 @@ width=44% />

This mode not only increases user privacy, but also makes the bot more efficient by reducing the number of inputs it needs to process. Users can always see a bot’s current privacy setting in the list of group members.

Testing your bot

-

To quickly test your bot without interfering with its users, you can simply run another instance of your code with a different token. You would then privately interact and run your benchmarks on the bot associated with the new token.

+

You can quickly test your bot without interfering with its users by simply running another instance of your code on a different bot account. To do so, create a new bot via @BotFather, obtain its token and use it in the testing instance of your code.

+

All further testing and debugging can happen privately on the new bot, without affecting the original instance.

If you need to share file references across bots, note that the file_id field is tied to a single bot id, so your test instance cannot use a shared file_id database to quickly send media – files must be individually reuploaded.

Dedicated test environment

-

Telegram also offers a dedicated test environment suitable for more advanced testing. Bots and users in this environment generally unlock expedited limits and more flexible restrictions – for example, you can test topics without needing 200 users in your group.

+

Telegram also offers a dedicated test environment suitable for more advanced testing. Bots and users in this environment generally have more flexible restrictions – for example:

+ +
+

Flood limits are not raised in the test environment, and may at times be stricter. To minimize how this impacts your bot, you should make sure that it handles errors with retry policies and does not depend on hardcoded limit values.

+

Creating a bot in the test environment

The test environment is completely separate from the main environment, so you will need to create a new user account and a new bot with @BotFather.

To create an account and log in, use either of the following:

@@ -375,7 +383,7 @@ width=44% />

After logging in, simply create a new bot following the standard procedure and send your requests to the Test Bot API in this format:

https://api.telegram.org/bot<token>/test/METHOD_NAME
-

When working with the test environment, you may use HTTP links without TLS to test your Web Apps.

+

When working with the test environment, you may use HTTP links without TLS in the url field of both LoginUrl and WebAppInfo.

Status alerts

Millions choose Telegram for its speed. To best benefit users, your bot also needs to be responsive. In order to help developers keep their bots in shape, @BotFather will send status alerts if it sees something is wrong.