def screenshotcheker(message): postgres = Session() score = 100 now = datetime.now() username = message.from_user.username chat_id = message.chat.id t = table('scores', column("id"), column("username"), column("score")) t.insert().values(id=chat_id, username=f'{username}', score=score) bot.send_message(message.chat.id, "Thank you for using our bot")