Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
68d2ea4
1
Parent(s):
48748b3
Update flood.py
Browse files- Powers/plugins/flood.py +4 -4
Powers/plugins/flood.py
CHANGED
|
@@ -49,7 +49,7 @@ action_kb = InlineKeyboardMarkup(
|
|
| 49 |
callback_data="f_ban"
|
| 50 |
),
|
| 51 |
InlineKeyboardButton(
|
| 52 |
-
"Kick",
|
| 53 |
callback_data="f_kick"
|
| 54 |
)
|
| 55 |
]
|
|
@@ -127,7 +127,7 @@ async def flood_on_off(c: Gojo, m: Message):
|
|
| 127 |
saction = is_flood[2]
|
| 128 |
slimit = is_flood[0]
|
| 129 |
swithin = is_flood[1]
|
| 130 |
-
return await m.reply_text(f"Flood is on for this chat\n**Action**:{saction}\n**Messages**:{slimit} within {swithin} sec")
|
| 131 |
return await m.reply_text("Flood protection is off of this chat.")
|
| 132 |
|
| 133 |
@Gojo.on_message(command(['setflood']) & ~filters.bot & admin_filter)
|
|
@@ -148,7 +148,7 @@ async def flood_set(c: Gojo, m: Message):
|
|
| 148 |
saction = is_flood[2]
|
| 149 |
slimit = is_flood[0]
|
| 150 |
swithin = is_flood[1]
|
| 151 |
-
return await m.reply_text(f"Flood is on for this chat\n**Action**:{saction}\n**Messages**:{slimit} within {swithin} sec")
|
| 152 |
return await m.reply_text("Flood protection is off of this chat.")
|
| 153 |
|
| 154 |
if len(split) == 2:
|
|
@@ -181,7 +181,7 @@ async def callbacks(c: Gojo, q: CallbackQuery):
|
|
| 181 |
user_status = (await q.message.chat.get_member(q.from_user.id)).status
|
| 182 |
if user in SUPPORT_STAFF or user_status in [CMS.OWNER, CMS.ADMINISTRATOR]:
|
| 183 |
if data in ["f_mute", "f_ban", "f_kick"]:
|
| 184 |
-
change =
|
| 185 |
Flood.save_flood(c_id, slimit, swithin, change)
|
| 186 |
await q.answer("Updated action", show_alert=True)
|
| 187 |
await q.edit_message_caption(
|
|
|
|
| 49 |
callback_data="f_ban"
|
| 50 |
),
|
| 51 |
InlineKeyboardButton(
|
| 52 |
+
"Kick 🦿",
|
| 53 |
callback_data="f_kick"
|
| 54 |
)
|
| 55 |
]
|
|
|
|
| 127 |
saction = is_flood[2]
|
| 128 |
slimit = is_flood[0]
|
| 129 |
swithin = is_flood[1]
|
| 130 |
+
return await m.reply_text(f"Flood is on for this chat\n**Action**: {saction}\n**Messages**: {slimit} within {swithin} sec")
|
| 131 |
return await m.reply_text("Flood protection is off of this chat.")
|
| 132 |
|
| 133 |
@Gojo.on_message(command(['setflood']) & ~filters.bot & admin_filter)
|
|
|
|
| 148 |
saction = is_flood[2]
|
| 149 |
slimit = is_flood[0]
|
| 150 |
swithin = is_flood[1]
|
| 151 |
+
return await m.reply_text(f"Flood is on for this chat\n**Action**: {saction}\n**Messages**: {slimit} within {swithin} sec")
|
| 152 |
return await m.reply_text("Flood protection is off of this chat.")
|
| 153 |
|
| 154 |
if len(split) == 2:
|
|
|
|
| 181 |
user_status = (await q.message.chat.get_member(q.from_user.id)).status
|
| 182 |
if user in SUPPORT_STAFF or user_status in [CMS.OWNER, CMS.ADMINISTRATOR]:
|
| 183 |
if data in ["f_mute", "f_ban", "f_kick"]:
|
| 184 |
+
change = data.split("_")[1]
|
| 185 |
Flood.save_flood(c_id, slimit, swithin, change)
|
| 186 |
await q.answer("Updated action", show_alert=True)
|
| 187 |
await q.edit_message_caption(
|