Allowed passing kwargs

This commit is contained in:
Profitroll 2023-07-26 14:12:05 +02:00
parent 295e77e403
commit 33c33d08e2
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2

View File

@ -59,6 +59,7 @@ class PyroClient(Client):
max_concurrent_transmissions: int = 1, max_concurrent_transmissions: int = 1,
commands_source: Union[Dict[str, dict], None] = None, commands_source: Union[Dict[str, dict], None] = None,
scheduler: Union[AsyncIOScheduler, BackgroundScheduler, None] = None, scheduler: Union[AsyncIOScheduler, BackgroundScheduler, None] = None,
**kwargs,
): ):
if config is None: if config is None:
with open(config_path, "r", encoding="utf-8") as f: with open(config_path, "r", encoding="utf-8") as f:
@ -90,6 +91,7 @@ class PyroClient(Client):
] ]
if "max_concurrent_transmissions" in self.config["bot"] if "max_concurrent_transmissions" in self.config["bot"]
else max_concurrent_transmissions, else max_concurrent_transmissions,
**kwargs,
) )
self.owner: int = self.config["bot"]["owner"] self.owner: int = self.config["bot"]["owner"]
self.commands: List[PyroCommand] = [] self.commands: List[PyroCommand] = []