Compare commits

...

2 Commits
v1.3 ... v1.4

Author SHA1 Message Date
1859d0532c Updated to 1.4 2023-06-26 13:06:55 +02:00
ebce8e0141 Fixed workers and max_concurrent_transmissions 2023-06-26 13:06:23 +02:00
3 changed files with 9 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
__name__ = "libbot"
__version__ = "1.3"
__version__ = "1.4"
__license__ = "GPL3"
__author__ = "Profitroll"

View File

@@ -1,6 +1,6 @@
import logging
from datetime import datetime, timedelta
from os import getpid
from os import cpu_count, getpid
from pathlib import Path
from time import time
from typing import List, Union
@@ -54,12 +54,16 @@ class PyroClient(Client):
bot_token=self.config["bot"]["bot_token"],
# Workers should be commented when using convopyro, otherwise
# handlers land in another event loop and you won't see them
workers=self.config["bot"]["workers"],
workers=self.config["bot"]["workers"]
if "workers" in self.config["bot"]
else min(32, cpu_count() + 4),
plugins=dict(root="plugins", exclude=self.config["disabled_plugins"]),
sleep_threshold=120,
max_concurrent_transmissions=self.config["bot"][
"max_concurrent_transmissions"
],
]
if "max_concurrent_transmissions" in self.config["bot"]
else 1,
)
self.owner: int = self.config["bot"]["owner"]
self.commands: List[PyroCommand] = []

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "libbot"
version = "1.3"
version = "1.4"
authors = [{ name = "Profitroll" }]
description = "Universal bot library with functions needed for basic Discord/Telegram bot development."
readme = "README.md"