Я использовал:
my_cursor.execute("SELECT id FROM users WHERE id = {}".format(update.effective_user.id))
, чтобы получить идентификатор пользователя и проверить, существует ли он в моей БД, но я получил следующую ошибку:
my_cursor.execute("SELECT id FROM users WHERE id = {}".format(update.effective_user.id))
AttributeError: 'CallbackContext' object has no attribute 'effective_user'