From ab5c0525630f5d248a48f6bbfff80626cf9cfe6a Mon Sep 17 00:00:00 2001 From: Linus E <75929322+Rripped@users.noreply.github.com> Date: Mon, 2 May 2022 18:45:32 +0200 Subject: [PATCH] added /gameinfo --- source/bot.py | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/source/bot.py b/source/bot.py index 08deb6c..60dfdc8 100644 --- a/source/bot.py +++ b/source/bot.py @@ -34,7 +34,9 @@ def send_start(message): Args: message (Message): message from telegram user, here /start """ - bot.reply_to(message, "Welcome to this amazon prices guesser bot") + bot.reply_to(message, ( "Welcome to the game...\n" + "Type /gameinfo for information about GuessThePrice\n" + "Type /help for an overview of all commands\n")) telebot.logger.setLevel(logging.DEBUG) @@ -64,6 +66,31 @@ def send_help(message): bot.reply_to(message, help_message, parse_mode='MARKDOWN') +@bot.message_handler(commands=['gameinfo', 'Gameinfo']) +def send_gameinfo(message): + """send game info to user + + Args: + message (Message): Message from telegram user, here /gameinfo + + Returns: + None: None + + Raises: + None: None + + """ + gameinfo_message = ("GuessThePrice is a game where you have to guess\n" + "the price of an amazon product.\n" + "Start by setting your name with /changename\n" + "You can get a new challenge every day.\n" + "You are informed when a new challenge is available.\n" + "To see the challenge type /challenge\n" + "To guess the price type /guess\n" + "At 22:00 pm the scores and answer will be shown\n") + bot.reply_to(message, gameinfo_message, parse_mode='MARKDOWN') + + # inline prints for debugging @bot.inline_handler(lambda query: query.query == 'text') def query_text(inline_query):