Skip to content

Commit

Permalink
updated terms
Browse files Browse the repository at this point in the history
  • Loading branch information
raihahahan committed Aug 24, 2024
1 parent 82519d9 commit 14c3756
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bot_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@
In case of emergencies, call ambulance 995, and inform either
- {ADMIN_HEAD_NAME} at <code>{ADMIN_HEAD_MOBILE}</code> @{ADMIN_HEAD} - ORC4BIKES Head, or
- {ADMIN_SAFETY_NAME} at <code>{ADMIN_SAFETY_MOBILE}</code> @{ADMIN_SAFETY} - ORC4BIKES Safety
To report any issues with the bot, inform
- {ADMIN_DEV} at @{ADMIN_SAFETY} - ORC4BIKES Dev
NOTE: THE USAGE OF THIS BOT ASSUMES THAT YOU AGREE TO THESE TERMS.
"""
Expand All @@ -91,7 +93,9 @@
In case of emergencies, call ambulance 995, and inform either
- {ADMIN_HEAD_NAME} at <code>{ADMIN_HEAD_MOBILE}</code> @{ADMIN_HEAD} - ORC4BIKES Head, or
- {ADMIN_SAFETY_NAME} at <code>{ADMIN_SAFETY_MOBILE}</code> @{ADMIN_SAFETY} - ORC4BIKES Safety
To report any issues with the bot, inform
- {ADMIN_DEV} at @{ADMIN_SAFETY} - ORC4BIKES Dev
If you agree, and ONLY if you agree, to the terms stated above, click "Accept".
"""
Expand Down
8 changes: 8 additions & 0 deletions bots/userbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,17 @@ def start_command(self, update, context):
if param.startswith("qr_"):
qr_param = param[3:] # Remove "qr_" prefix
self.qr_rent_command(update, context, qr_param)
elif param.startswith("terms"):
self.link_terms_command(update, context)
else:
update.message.reply_text("Invalid start parameter.")

def link_terms_command(self, update, context):
text = TERMS_TEXT.format(**globals())
update.message.reply_text(
text, parse_mode='HTML',
)

def qr_rent_command(self, update, context, bike_name):
"""
The QR Rent command is invoked on calling the telegram bot URL with a qr_ start parameter. It follows the same process as the normal bike renting, but streamlines the process and skips some steps.
Expand Down

0 comments on commit 14c3756

Please sign in to comment.