Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
138ae8f
1
Parent(s):
9b90e1a
Update flood.py
Browse files- Powers/plugins/flood.py +6 -2
Powers/plugins/flood.py
CHANGED
@@ -152,13 +152,17 @@ async def flood_set(c: Gojo, m: Message):
|
|
152 |
return await m.reply_text("Flood protection is off for this chat.")
|
153 |
|
154 |
if len(split) == 2:
|
|
|
|
|
|
|
|
|
155 |
c_id = m.chat.id
|
156 |
if split[1].lower() in on_key:
|
157 |
-
Flood.save_flood(
|
158 |
await m.reply_text("Flood protection has been started for this group.")
|
159 |
return
|
160 |
if split[1].lower() in off_key:
|
161 |
-
Flood.rm_flood(
|
162 |
await m.reply_text("Flood protection has been stopped for this chat")
|
163 |
return
|
164 |
await m.reply_text("**Usage:**\n `/setflood on/off`")
|
|
|
152 |
return await m.reply_text("Flood protection is off for this chat.")
|
153 |
|
154 |
if len(split) == 2:
|
155 |
+
if is_flood:
|
156 |
+
saction = is_flood[2]
|
157 |
+
slimit = is_flood[0]
|
158 |
+
swithin = is_flood[1]
|
159 |
c_id = m.chat.id
|
160 |
if split[1].lower() in on_key:
|
161 |
+
Flood.save_flood(c_id, 5, 5, 'mute')
|
162 |
await m.reply_text("Flood protection has been started for this group.")
|
163 |
return
|
164 |
if split[1].lower() in off_key:
|
165 |
+
Flood.rm_flood(c_id, slimit, swithin, saction)
|
166 |
await m.reply_text("Flood protection has been stopped for this chat")
|
167 |
return
|
168 |
await m.reply_text("**Usage:**\n `/setflood on/off`")
|