randydev commited on
Commit
fa6ba3e
·
verified ·
1 Parent(s): 880c36c

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -43,7 +43,7 @@ def has_code_entity(message):
43
  return True
44
  return False
45
 
46
- @bot.on_callback_query(filters.regex(r"^unwarn_(\d+)_(\d+)$"))
47
  async def unwarn_button(client, callback_query):
48
  user_id = int(callback_query.matches[0].group(1))
49
  chat_id = int(callback_query.matches[0].group(2))
@@ -60,7 +60,7 @@ async def unwarn_button(client, callback_query):
60
  await db.warns.delete_one({"chat_id": chat_id, "user_id": user_id})
61
  await callback_query.message.edit_text(f"✅ Peringatan untuk <code>{user_id}</code> telah dihapus.")
62
 
63
- @bot.on_callback_query(filters.regex(r"^warn_(\d+)_(\d+)$"))
64
  async def warn_button(client, callback_query):
65
  user_id = int(callback_query.matches[0].group(1))
66
  chat_id = int(callback_query.matches[0].group(2))
@@ -108,7 +108,7 @@ async def warn_button(client, callback_query):
108
  else:
109
  await callback_query.answer(f"⚠️ Peringatan ke {warn_count} diberikan.", show_alert=True)
110
 
111
- @bot.on_callback_query(filters.regex(r"^unban_(\d+)_(\d+)$"))
112
  async def unban_button(client, callback_query):
113
  user_id = int(callback_query.matches[0].group(1))
114
  chat_id = int(callback_query.matches[0].group(2))
 
43
  return True
44
  return False
45
 
46
+ @bot.on_callback_query(filters.regex(r"^unwarn_(\d+)_(-?\d+)$"))
47
  async def unwarn_button(client, callback_query):
48
  user_id = int(callback_query.matches[0].group(1))
49
  chat_id = int(callback_query.matches[0].group(2))
 
60
  await db.warns.delete_one({"chat_id": chat_id, "user_id": user_id})
61
  await callback_query.message.edit_text(f"✅ Peringatan untuk <code>{user_id}</code> telah dihapus.")
62
 
63
+ @bot.on_callback_query(filters.regex(r"^warn_(\d+)_(-?\d+)$"))
64
  async def warn_button(client, callback_query):
65
  user_id = int(callback_query.matches[0].group(1))
66
  chat_id = int(callback_query.matches[0].group(2))
 
108
  else:
109
  await callback_query.answer(f"⚠️ Peringatan ke {warn_count} diberikan.", show_alert=True)
110
 
111
+ @bot.on_callback_query(filters.regex(r"^unban_(\d+)_(-?\d+)$"))
112
  async def unban_button(client, callback_query):
113
  user_id = int(callback_query.matches[0].group(1))
114
  chat_id = int(callback_query.matches[0].group(2))