exclude jannoids with USE_ADMIGGER_THREADS perm from 50 files ratelimit

master
Aevann 2023-03-07 02:46:51 +02:00
parent 1738f11f9c
commit 57908aabf2
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ def remove_media(path):
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: if count > 50 and v.admin_level < PERMS['USE_ADMIGGER_THREADS']:
print(STARS, flush=True) print(STARS, flush=True)
print(f'@{v.username} hit the 50 file daily limit!') print(f'@{v.username} hit the 50 file daily limit!')
print(STARS, flush=True) print(STARS, flush=True)