conditions = [
{
'min_lvl': 0,
'max_lvl': 10,
'exp': 10000
},
{
'min_lvl': 10,
'max_lvl': 20,
'exp': 20000
},
]
for _cond in conditions:
if lvl < _cond['max_lvl'] and lvl >= _cond['min_lvl'] and exp % _cond['exp'] == 0:
cursor.execute(f"UPDATE users SET lvl = lvl + 1 WHERE id = {message.author.id}")
connection.commit()
break
...
while True:
fresh_news = check_news_update()
if fresh_news is None:
await asyncio.sleep(1800)
continue
if len(fresh_news) >= 1:
...
В инете не нашел :-(
if message.text == countries_easy.values():
bot.register_next_step_handler(msg, easy_game, country[1])
if message.text.lower() == right_answer.lower():
@bot.callback_query_handler(func= lambda call: True)
и смог добиться этого только с помощью background-color: none для options.