def user_money(self, user_id):
with self.connection:
user_mny = "SELECT money FROM users WHERE user_id = (%s)"
result = self.cursor.execute(user_mny, (user_id))
result = self.cursor.fetchone()
if result in self.cursor is not None:
print(result)
return int(result[0)
else:
result = result[0]
print(result)
print("!")
self.connection.close