def register_user(user, username, first_name, last_name):
user_check_query = f'SELECT * FROM USERS WHERE user_id = {user};'
user_check_data = post_sql_query(user_check_query)
if not user_check_data:
insert_to_db_query = f'INSERT INTO USERS (user_id, username, first_name, last_name, reg_date) VALUES ({user}, "{username}", "{first_name}", "{last_name}", "{ctime()}");'
post_sql_query(insert_to_db_query )
bot.send_message(chat_id, '<a href="https://qna.habr.com/q/871643">Как научить бота прятать в текст ссылку и отправлять клиенту?</a>', parse_mode='html', disable_web_page_preview=True)
bot.send_message(chat_id, '[Как научить бота прятать в текст ссылку и отправлять клиенту?](https://qna.habr.com/q/871643)', parse_mode='MarkdownV2', disable_web_page_preview=True)
from random import choice
def checking_letter(list_of_word):
word = list(choice(list_of_word))
letter = choice(word)
word[word.index(letter)] = "?"
letter_from_user = input(f"Word: {''.join(word)}\n"
f"What letter is hidden?\n"
f"Type letter: ")
if letter_from_user == letter:
print("You guess!")
else:
while letter_from_user != letter:
if input(f"Try again: ") == letter:
print("You guess!")
break
checking_letter(list_of_word)