Template
mirror of
https://github.com/djimboy/djimbo_template_aio3.git
synced 2026-08-27 23:47:44 +00:00
Update
This commit is contained in:
@@ -37,12 +37,12 @@ class ThrottlingMiddleware(BaseMiddleware):
|
|||||||
else:
|
else:
|
||||||
if self.count_throttled == 0:
|
if self.count_throttled == 0:
|
||||||
self.count_throttled += 1
|
self.count_throttled += 1
|
||||||
self.now_rate = self.default_rate * 2
|
self.now_rate += self.default_rate * 2
|
||||||
|
|
||||||
return await handler(event, data)
|
return await handler(event, data)
|
||||||
elif self.count_throttled == 1:
|
elif self.count_throttled == 1:
|
||||||
self.count_throttled += 1
|
self.count_throttled += 1
|
||||||
self.now_rate = self.default_rate * 2
|
self.now_rate += self.default_rate * 2
|
||||||
|
|
||||||
await event.reply("<b>❗ Пожалуйста, не спамьте.</b>")
|
await event.reply("<b>❗ Пожалуйста, не спамьте.</b>")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user