removed requirement and changed /start
This commit is contained in:
parent
bd0b261e5c
commit
d4604dd960
@ -5,4 +5,3 @@ SQLAlchemy~=1.4.36
|
|||||||
pymysql==1.0.2
|
pymysql==1.0.2
|
||||||
requests~=2.27.1
|
requests~=2.27.1
|
||||||
beautifulsoup4~=4.11.1
|
beautifulsoup4~=4.11.1
|
||||||
cryptography~=37.0.1
|
|
@ -37,8 +37,8 @@ def send_start(message):
|
|||||||
Args:
|
Args:
|
||||||
message (Message): message from telegram user, here /start
|
message (Message): message from telegram user, here /start
|
||||||
"""
|
"""
|
||||||
bot.send_message(chat_id=int(message.from_user.id), text=( "Welcome to the game...\n \
|
bot.send_message(chat_id=int(message.from_user.id), text=( "Welcome to the game... \
|
||||||
To start please set a name for yourself:"))
|
\nTo start please set a name for yourself or type cancel to set default name:"))
|
||||||
|
|
||||||
bot.register_next_step_handler(message, start_name_setter)
|
bot.register_next_step_handler(message, start_name_setter)
|
||||||
|
|
||||||
@ -49,9 +49,14 @@ def start_name_setter(message):
|
|||||||
Args:
|
Args:
|
||||||
message (Message): Message to react to
|
message (Message): Message to react to
|
||||||
"""
|
"""
|
||||||
bot.reply_to(message, "Thank you for setting your name {message.text} \
|
if str(message.text).lower() == "cancel": # Set user name to user
|
||||||
\nType /gameinfo for information about GuessThePrice \
|
bot.reply_to(message, "Your username will be set to default_user. \
|
||||||
\nType /help for an overview of all commands")
|
\nType /gameinfo for information about GuessThePrice \
|
||||||
|
\nType /help for an overview of all commands")
|
||||||
|
else:
|
||||||
|
bot.reply_to(message, f"Thank you for setting your name {message.text} \
|
||||||
|
\nType /gameinfo for information about GuessThePrice \
|
||||||
|
\nType /help for an overview of all commands")
|
||||||
|
|
||||||
|
|
||||||
telebot.logger.setLevel(logging.DEBUG)
|
telebot.logger.setLevel(logging.DEBUG)
|
||||||
|
Loading…
Reference in New Issue
Block a user