1
Fork 0
mirror of https://github.com/Steffo99/greed.git synced 2024-11-22 05:54:18 +00:00

Accept any commands starting with /start to start the bot

This commit is contained in:
Steffo 2020-03-31 01:52:44 +02:00
parent 3caa5ef179
commit d0faae11fb

View file

@ -53,7 +53,7 @@ def main():
# Skip the update # Skip the update
continue continue
# If the message is a start command... # If the message is a start command...
if isinstance(update.message.text, str) and update.message.text == "/start": if isinstance(update.message.text, str) and update.message.text.startswith("/start"):
# Check if a worker already exists for that chat # Check if a worker already exists for that chat
old_worker = chat_workers.get(update.message.chat.id) old_worker = chat_workers.get(update.message.chat.id)
# If it exists, gracefully stop the worker # If it exists, gracefully stop the worker