Add a basic description of tlapbot to !help.

Change default to not list redeems, and instead redirect to dashboard
This commit is contained in:
Lili (Tlapka) 2022-11-09 15:14:10 +01:00
parent e33ab1f74b
commit 6f96019257
3 changed files with 11 additions and 7 deletions

View File

@ -3,4 +3,4 @@ OWNCAST_ACCESS_TOKEN=''
OWNCAST_INSTANCE_URL='http://localhost:8080'
POINTS_CYCLE_TIME=600
POINTS_AMOUNT_GIVEN=10
LIST_REDEEMS=True
LIST_REDEEMS=False

View File

@ -1,6 +1,6 @@
REDEEMS={
"hydrate": {"price": 60, "type": "list"},
"lurk": {"price": 1, "type": "counter", "info": "Let everyone know you're going to lurk."},
"react": {"price": 200, "type": "note", "info": "Attach a link to a video for me to react to."},
"request": {"price": 100, "type": "note", "info": "Request a gamemode, level, skin, etc."}
"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."}
}

View File

@ -4,16 +4,20 @@ from tlapbot.owncast_helpers import send_chat
def send_help():
message = []
message.append("Tlapbot gives you points for being in chat, and then allows you to spend those points.\n")
message.append(f"People connected to chat receive {current_app.config['POINTS_AMOUNT_GIVEN']} points every {current_app.config['POINTS_CYCLE_TIME']} seconds.\n")
message.append("You can see your points and recent redeems in the Tlapbot dashboard. Look for a button to click under the stream window.\n")
message.append("""Tlapbot commands:
!help to see this help message.
!points to see your points.
!name_update to force name update if tlapbot didn't catch it.\n"""
!points to see your points.\n"""
)
if current_app.config['LIST_REDEEMS']:
message.append("Tlapbot redeems:\n")
message.append("Active redeems:\n")
for redeem, redeem_info in current_app.config['REDEEMS'].items():
if 'info' in redeem_info:
message.append(f"!{redeem} for {redeem_info['price']} points. {redeem_info['info']}\n")
else:
message.append(f"!{redeem} for {redeem_info['price']} points.\n")
else:
message.append("Check the dashboard for a list of currently active redeems.")
send_chat(''.join(message))