No need to save bot's ID anymore

This commit is contained in:
Profitroll
2023-01-04 17:26:27 +01:00
parent 083281e784
commit ccbc135ee4
2 changed files with 1 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ async def any_stage(app: Client, msg: Message):
@app.on_message(~ filters.scheduled & filters.group)
async def message_in_group(app: Client, msg: Message):
if (msg.chat is not None) and (msg.via_bot is not None):
if (msg.via_bot.id == configGet("bot_id")) and (msg.chat.id == configGet("destination_group")):
if (msg.via_bot.id == (await app.get_me()).id) and (msg.chat.id == configGet("destination_group")):
if configGet("remove_application_time") > 0:
logWrite(f"User {msg.from_user.id} requested application in destination group, removing in {configGet('remove_application_time')} minutes")
await asyncio.sleep(configGet("remove_application_time")*60)