Skip to content

Commit

Permalink
Accept start command if waiting for something else
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielRF committed Jul 27, 2024
1 parent 7a52a72 commit fff096d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,10 +604,7 @@ def add_email(message):
text = None

if text in cmds:
msg = send_message(
message.from_user.id, i18n.t("bot.askemail", locale=user_lang)
)
bot.register_next_step_handler(msg, add_email)
start(message)
return 0
elif "/" not in message.text:
if validate_email(message.text.lower()) and check_domain(message.text.lower()):
Expand Down Expand Up @@ -700,10 +697,7 @@ def get_file(message):
)
elif message.content_type == "text":
if message.text.lower() in cmds:
send_message(
message.from_user.id,
i18n.t("bot.askfile", locale=user_lang),
)
start(message)
return 0
elif '.onion' in message.text.lower():
bot.delete_message(message.from_user.id, message.message_id)
Expand Down Expand Up @@ -957,5 +951,5 @@ def getMessage():
return "!", 200

if __name__ == "__main__":
bot.infinity_polling()
#server.run(host="0.0.0.0", port=443, ssl_context=(f'{CERT}', f'{PRIVKEY}'))
# bot.infinity_polling()
server.run(host="0.0.0.0", port=443, ssl_context=(f'{CERT}', f'{PRIVKEY}'))

0 comments on commit fff096d

Please sign in to comment.