Spaces:
Build error
Build error
Update code.py
Browse files
code.py
CHANGED
|
@@ -5,7 +5,7 @@ from telethon.tl.types import ChannelParticipantAdmin, ChannelParticipantCreator
|
|
| 5 |
|
| 6 |
api_id = "28810829"
|
| 7 |
api_hash = "d3f304bbd0b69b8c30dbec4be5824748"
|
| 8 |
-
bot_token = os.getenv("
|
| 9 |
|
| 10 |
# Define the user ID that is allowed to send commands
|
| 11 |
allowed_user_id = [1982395401, 5575183435, 7014359344] # Replace with the actual user ID
|
|
@@ -93,7 +93,7 @@ async def handle_new_message(event):
|
|
| 93 |
await event.delete()
|
| 94 |
if member not in allowed_user_id:
|
| 95 |
try:
|
| 96 |
-
await client.kick_participant(chat_id, member)
|
| 97 |
except Exception as e:
|
| 98 |
logger.info(f"Exception: {e}")
|
| 99 |
|
|
|
|
| 5 |
|
| 6 |
api_id = "28810829"
|
| 7 |
api_hash = "d3f304bbd0b69b8c30dbec4be5824748"
|
| 8 |
+
bot_token = os.getenv("BOT_TOKEN")
|
| 9 |
|
| 10 |
# Define the user ID that is allowed to send commands
|
| 11 |
allowed_user_id = [1982395401, 5575183435, 7014359344] # Replace with the actual user ID
|
|
|
|
| 93 |
await event.delete()
|
| 94 |
if member not in allowed_user_id:
|
| 95 |
try:
|
| 96 |
+
await event.client.kick_participant(chat_id, member)
|
| 97 |
except Exception as e:
|
| 98 |
logger.info(f"Exception: {e}")
|
| 99 |
|