From a5a9a97dbce63c28dee85130d42aa8413d05e1ab Mon Sep 17 00:00:00 2001 From: profitroll Date: Wed, 21 Jun 2023 13:50:38 +0200 Subject: [PATCH] max_concurrent_transmissions built-in --- classes/pyroclient.py | 3 +++ config_example.json | 1 + 2 files changed, 4 insertions(+) diff --git a/classes/pyroclient.py b/classes/pyroclient.py index 6605c0e..a306c64 100644 --- a/classes/pyroclient.py +++ b/classes/pyroclient.py @@ -45,6 +45,9 @@ class PyroClient(Client): workers=self.config["bot"]["workers"], plugins=dict(root="plugins", exclude=self.config["disabled_plugins"]), sleep_threshold=120, + max_concurrent_transmissions=self.config["bot"][ + "max_concurrent_transmissions" + ], ) self.owner: int = self.config["bot"]["owner"] self.commands: List[PyroCommand] = [] diff --git a/config_example.json b/config_example.json index ca1a356..4ae1d9a 100644 --- a/config_example.json +++ b/config_example.json @@ -6,6 +6,7 @@ "api_hash": "", "bot_token": "", "workers": 1, + "max_concurrent_transmissions": 1, "scoped_commands": true }, "reports": {