change redeem categories to list format

This commit is contained in:
Lili (Tlapka) 2023-01-13 18:51:44 +01:00
parent 02bf3223c4
commit dc68887c82
2 changed files with 6 additions and 3 deletions

View File

@ -2,6 +2,6 @@ REDEEMS={
"hydrate": {"price": 60, "type": "list"},
"lurk": {"price": 1, "type": "counter", "info": "Let us know you're going to lurk."},
"react": {"price": 200, "type": "note", "info": "Attach link to a video for me to react to."},
"request": {"price": 100, "type": "note", "info": "Request a level, gamemode, skin, etc."}
"inactive": {"price": 100, "type": "note", "info": "Example redeem that is inactive by default", "category": "inactive"}
"request": {"price": 100, "type": "note", "info": "Request a level, gamemode, skin, etc."},
"inactive": {"price": 100, "type": "note", "info": "Example redeem that is inactive by default", "category": ["inactive"]}
}

View File

@ -236,7 +236,10 @@ def remove_emoji(message):
def is_redeem_active(redeem, active_categories):
if "category" in redeem[1] and redeem[1]["category"] not in active_categories:
if "category" in redeem[1]:
for category in redeem[1]["category"]:
if category in active_categories:
return True
return False
return True