Skip to content

Commit

Permalink
Notice when bot was kicked (IRC lamer 🤘)
Browse files Browse the repository at this point in the history
  • Loading branch information
drego85 committed Feb 26, 2024
1 parent d08e3b8 commit 9c62d47
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tosint.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ def main():
if response.json().get('result'):
telegram_get_chat_member = response.json().get('result')
print(f"Bot In The Chat Is An: {telegram_get_chat_member['status']}")
elif response.json().get('parameters')['migrate_to_chat_id']:
migrate_to_chat_id = response.json().get('parameters')['migrate_to_chat_id']
print(f"ATTENTION {response.json().get('description')} - Migrated to: {migrate_to_chat_id}")
elif response.json().get('description'):
if response.json().get('parameters') and 'migrate_to_chat_id' in response.json().get('parameters'):
print(f"ATTENTION {response.json().get('description')} - Migrated to: {response.json().get('parameters')['migrate_to_chat_id']}")
else:
print(f"ATTENTION {response.json().get('description')}")

# Get Chat Info

Expand Down

0 comments on commit 9c62d47

Please sign in to comment.