Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
ce472f3
1
Parent(s):
984e9bc
Update flood.py
Browse files- Powers/plugins/flood.py +4 -4
Powers/plugins/flood.py
CHANGED
|
@@ -31,7 +31,7 @@ close_kb =InlineKeyboardMarkup(
|
|
| 31 |
[
|
| 32 |
InlineKeyboardButton(
|
| 33 |
"Close ❌",
|
| 34 |
-
callback_data="
|
| 35 |
)
|
| 36 |
]
|
| 37 |
]
|
|
@@ -167,7 +167,7 @@ async def flood_set(c: Gojo, m: Message):
|
|
| 167 |
@Gojo.on_callback_query(filters.regex("^f_"))
|
| 168 |
async def callbacks(c: Gojo, q: CallbackQuery):
|
| 169 |
data = q.data
|
| 170 |
-
if data == "
|
| 171 |
await q.answer("Closed")
|
| 172 |
await q.message.delete()
|
| 173 |
return
|
|
@@ -196,7 +196,7 @@ async def callbacks(c: Gojo, q: CallbackQuery):
|
|
| 196 |
f"Set the limit of message after the flood protection will be activated\n **CURRENT LIMIT** {slimit} messages",
|
| 197 |
reply_markup=limit_kb
|
| 198 |
)
|
| 199 |
-
|
| 200 |
change = int(data.split("_")[1])
|
| 201 |
if not change == slimit:
|
| 202 |
Flood.save_flood(c_id, change, swithin, saction)
|
|
@@ -212,7 +212,7 @@ async def callbacks(c: Gojo, q: CallbackQuery):
|
|
| 212 |
f"Set the limit of message after the flood protection will be activated\n **CURRENT LIMIT** {slimit} messages",
|
| 213 |
reply_markup=limit_kb
|
| 214 |
)
|
| 215 |
-
|
| 216 |
data = data.split("_")[-1]
|
| 217 |
change = int(data)
|
| 218 |
if not change == swithin:
|
|
|
|
| 31 |
[
|
| 32 |
InlineKeyboardButton(
|
| 33 |
"Close ❌",
|
| 34 |
+
callback_data="fclose"
|
| 35 |
)
|
| 36 |
]
|
| 37 |
]
|
|
|
|
| 167 |
@Gojo.on_callback_query(filters.regex("^f_"))
|
| 168 |
async def callbacks(c: Gojo, q: CallbackQuery):
|
| 169 |
data = q.data
|
| 170 |
+
if data == "fclose":
|
| 171 |
await q.answer("Closed")
|
| 172 |
await q.message.delete()
|
| 173 |
return
|
|
|
|
| 196 |
f"Set the limit of message after the flood protection will be activated\n **CURRENT LIMIT** {slimit} messages",
|
| 197 |
reply_markup=limit_kb
|
| 198 |
)
|
| 199 |
+
elif data in ["f_5", "f_10", "f_15"]:
|
| 200 |
change = int(data.split("_")[1])
|
| 201 |
if not change == slimit:
|
| 202 |
Flood.save_flood(c_id, change, swithin, saction)
|
|
|
|
| 212 |
f"Set the limit of message after the flood protection will be activated\n **CURRENT LIMIT** {slimit} messages",
|
| 213 |
reply_markup=limit_kb
|
| 214 |
)
|
| 215 |
+
elif data in ["f_f_5", "f_f_10", "f_f_15"]:
|
| 216 |
data = data.split("_")[-1]
|
| 217 |
change = int(data)
|
| 218 |
if not change == swithin:
|