change redeem categories to list format
This commit is contained in:
parent
02bf3223c4
commit
dc68887c82
|
@ -2,6 +2,6 @@ REDEEMS={
|
||||||
"hydrate": {"price": 60, "type": "list"},
|
"hydrate": {"price": 60, "type": "list"},
|
||||||
"lurk": {"price": 1, "type": "counter", "info": "Let us know you're going to lurk."},
|
"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."},
|
"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."}
|
"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"}
|
"inactive": {"price": 100, "type": "note", "info": "Example redeem that is inactive by default", "category": ["inactive"]}
|
||||||
}
|
}
|
|
@ -236,7 +236,10 @@ def remove_emoji(message):
|
||||||
|
|
||||||
|
|
||||||
def is_redeem_active(redeem, active_categories):
|
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 False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue