forked from rDrama/rDrama
print to console when 50 limit is hit
parent
86b0d2f5c1
commit
2d9580c30c
|
@ -23,7 +23,9 @@ from .config.const import *
|
||||||
def media_ratelimit(v):
|
def media_ratelimit(v):
|
||||||
t = time.time() - 86400
|
t = time.time() - 86400
|
||||||
count = g.db.query(Media).filter(Media.user_id == v.id, Media.created_utc > t).count()
|
count = g.db.query(Media).filter(Media.user_id == v.id, Media.created_utc > t).count()
|
||||||
if count > 50: abort(500)
|
if count > 50:
|
||||||
|
abort(500)
|
||||||
|
print(f'\n\n★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★\n\n@{v.username} hit the 50 files daily limit!\n\n★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★\n\n', flush=True)
|
||||||
|
|
||||||
def process_files(files, v, body):
|
def process_files(files, v, body):
|
||||||
if g.is_tor or not files.get("file"): return body
|
if g.is_tor or not files.get("file"): return body
|
||||||
|
|
Loading…
Reference in New Issue