another list_redeems fix

dont use list_redeems
This commit is contained in:
Lili (Tlapka) 2024-02-10 12:21:29 +01:00
parent 61d318f418
commit 5e7810eb9f
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,9 @@ def send_help():
if current_app.config['LIST_REDEEMS']: if current_app.config['LIST_REDEEMS']:
message.append("Active redeems: <br>") message.append("Active redeems: <br>")
for redeem, redeem_info in current_app.config['REDEEMS'].items(): for redeem, redeem_info in current_app.config['REDEEMS'].items():
if redeem_info.get('category', None):
if not set(redeem_info['category']).intersection(set(current_app.config['ACTIVE_CATEGORIES'])):
continue
if 'type' in redeem_info and redeem_info['type'] == 'milestone': if 'type' in redeem_info and redeem_info['type'] == 'milestone':
message.append(f"!{redeem} milestone with goal of {redeem_info['goal']}.") message.append(f"!{redeem} milestone with goal of {redeem_info['goal']}.")
else: else: