Replymessage unavailable
@app.on_message(filters.command("ban"))
async def ban_user(client, message):
if len(message.command) != 2:
await message.reply_text("Please provide a user ID to ban.")
return
try:
user_id = int(message.command[1])
# Ban the user forever
await app.ban_chat_member(message.chat.id, user_id)
await message.reply_text(f"User {user_id} has been banned.")
ban_list.add(user_id) # Add to ban list
except Exception as e:
await message.reply_text(f"Failed to ban user: {e}")