Compare commits

...

2 Commits
v1.7 ... v1.8

Author SHA1 Message Date
295e77e403 Updated to 1.8 2023-07-03 10:57:00 +02:00
279a8e9d84 reports.chat_id can now be "owner" 2023-07-03 10:56:24 +02:00
3 changed files with 8 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
__name__ = "libbot"
__version__ = "1.7"
__version__ = "1.8"
__license__ = "GPL3"
__author__ = "Profitroll"

View File

@@ -128,7 +128,9 @@ class PyroClient(Client):
try:
await self.send_message(
chat_id=self.config["reports"]["chat_id"],
chat_id=self.owner
if self.config["reports"]["chat_id"] == "owner"
else self.config["reports"]["chat_id"],
text=f"Bot started PID `{getpid()}`",
)
@@ -150,7 +152,9 @@ class PyroClient(Client):
async def stop(self, exit_completely: bool = True):
try:
await self.send_message(
chat_id=self.config["reports"]["chat_id"],
chat_id=self.owner
if self.config["reports"]["chat_id"] == "owner"
else self.config["reports"]["chat_id"],
text=f"Bot stopped with PID `{getpid()}`",
)
await asyncio.sleep(0.5)

View File

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