reports.chat_id can now be "owner"
This commit is contained in:
parent
ae374511cd
commit
279a8e9d84
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user