Discord.py... variable problem

Question: So… i have a code with two commands, the two command is “h!perfil” and “h!set-hp”, the “h!perfil” is a command that creates a profile for a user, this command just show the user profile, can’t be used in the others, inside this command has variables, one of this variables is the “hp” whos have a initial value of 5.000, this variables can be changed with a command, in that case of hp, is the “h!set-hp”, example:

h!set-hp @user 5.400 and when you use “h!perfil” the command will show “5.400” in the hp

but, this is’nt happening, when you use the command “h!set-hp” and choose a value, he don’t function, he saves in an archive json that i have created (i created a variavel.json in the repl.it, idk if i need to create a JSON archive in my computer ou just this is sufficient) inside of the repl.it but when you use “h!perfil” he just show the initial value and not the value choosed

(i’m from Brazil, so obviously the code it’s in portuguese from Brazil, sry for the english mistakes… and my code isn’t just that below so… i think will be complicated for seeing the code in the link)**

Screenshots, links, or other helpful context:**

Repl link/Link to where the bug appears:
https://replit.com/@EterMoon/bot

Screenshots, links, or other helpful context:

import discord
from discord.ext import commands
import json
import random

class MeuBot(commands.Bot):
    def __init__(self, command_prefix, intents):
        super().__init__(command_prefix=command_prefix, intents=intents)
        self.perfil_variaveis = self.carregar_variaveis()

    def carregar_variaveis(self):
        try:
            with open("variaveis.json", "r") as file:
                variaveis = json.load(file)
                print("Variáveis carregadas:", variaveis)
                return variaveis
        except FileNotFoundError:
            print("Arquivo de variáveis não encontrado.")
            return {}

    def salvar_variaveis(self, variaveis):
        with open("variaveis.json", "w") as file:
            json.dump(variaveis, file, indent=4)

# Criação da instância do bot
intents = discord.Intents.default()
intents.message_content = True
bot = MeuBot(command_prefix='h!', intents=intents)

@bot.event
async def on_ready():
  print(f'Logged in as {bot.user.name}')

@bot.command(name="perfil")
async def perfil(ctx):
    cor_embed = discord.Color(random.randint(0, 0xFFFFFF))

    embed = discord.Embed(description=criar_mensagem_perfil(ctx.author, bot.perfil_variaveis), color=cor_embed)
    embed.set_image(url='https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/24b541f2-c2d7-41c3-b89f-b0011b876444/demke9z-44a7de58-6f05-4330-9e77-c81aae091fdf.png/v1/fill/w_1192,h_670,q_70,strp/gilgamesh_by_icarus0620_demke9z-pre.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7ImhlaWdodCI6Ijw9NzIwIiwicGF0aCI6IlwvZlwvMjRiNTQxZjItYzJkNy00MWMzLWI4OWYtYjAwMTFiODc2NDQ0XC9kZW1rZTl6LTQ0YTdkZTU4LTZmMDUtNDMzMC05ZTc3LWM4MWFhZTA5MWZkZi5wbmciLCJ3aWR0aCI6Ijw9MTI4MCJ9XV0sImF1ZCI6WyJ1cm46c2VydmljZTppbWFnZS5vcGVyYXRpb25zIl19.03gN9j_VTyyFfjwXrTzGIDdtHRvSeNBQb5YyJ9dOsi0')
    await ctx.send(embed=embed)

def criar_mensagem_perfil(member, perfil_variaveis):

    print("Valor original do HP:", perfil_variaveis.get(member.id, {}).get('hp', 5000))
    mensagem = (
        f"**╭┄┄┄┄┄┄⇢ Perfil ⇠┄┄┄┄┄┄╮**\n"
        "    \n"
        f"**<a:Stars_Mazushi:987732489764241458> Aqui Mostrará As Suas Informações. <a:Stars_Mazushi:987732489764241458>**\n"
        "    \n"
        f"**⊱⋅ ────── ❴ • ✿ • ❵ ────── ⋅⊰**\n"
        "    \n"
        f"**❪ :bust_in_silhouette: ❫ Nome. . . ⇢ {member.display_name}**\n"
        "    \n"
        f"**❪ :scroll: ❫ Título. . . ⇢ {perfil_variaveis.get(member.id, {}).get('titulo', 'Não definido')}**\n"
        "    \n"
        f"**❪ :crystal_ball: ❫ Elemento. . . ⇢ {perfil_variaveis.get(member.id, {}).get('elemento', 'Nenhum')}**\n"
        "    \n"
        f"**❪ :sparkles: ❫ Raça. . . ⇢ {perfil_variaveis.get(member.id, {}).get('raca', 'Nenhuma')}**\n"
        "    \n"
        f"**❪ :dagger: ❫ Classe. . . ⇢ {perfil_variaveis.get(member.id, {}).get('classe', 'Nenhuma')}**\n"
        "    \n"
        f"**❪ :crown: ❫ Rank. . . ⇢ {perfil_variaveis.get(member.id, {}).get('rank', 'Rank E')}**\n"
        "    \n"
        f"**❪ :person_fencing: ❫ Maestria. . . ⇢ {perfil_variaveis.get(member.id, {}).get('maestria', 'Nenhuma')}**\n"
        "    \n"
        f"**❪ :shield: ❫ Herói Cardinal. . . ⇢ {perfil_variaveis.get(member.id, {}).get('heroi_cardinal', 'Nenhum')}**\n"
        "    \n"
        f"**❪ :star2: ❫ Habilidade Única. . . ⇢ {perfil_variaveis.get(member.id, {}).get('habilidade_unica', 'Nenhuma')}**\n"
        "    \n"
        f"**❪ :tulip: ❫ Benção. . . ⇢ {perfil_variaveis.get(member.id, {}).get('bencao', 'Nenhuma')}**\n"
        "    \n"
        f"**❪ :wilted_rose: ❫ Maldição. . . ⇢ {perfil_variaveis.get(member.id, {}).get('maldicao', 'Nenhuma')}**\n"
        "    \n"
        f"**❪ :hourglass_flowing_sand: ❫ Buffs/Debuffs. . . ⇢ {perfil_variaveis.get(member.id, {}).get('buffs_debuffs', 'Nenhum')}**\n"
        "    \n"
        f"**⊱⋅ ────── ❴ • ✿ • ❵ ────── ⋅⊰**\n"
        "    \n"
        f"**❪ <a:Heart_Mazushi:987731221624795198> ❫ Hp. . . ⇢ {perfil_variaveis.get(member.id, {}).get('hp', 5.000):.3f}**\n"
        "    \n"
        f"**❪ <a:Mago_Mazushi:987731599460278296> ❫ Ikari. . . ⇢ {perfil_variaveis.get(member.id, {}).get('ikari', 'Não definido')}**\n"
        "    \n"
        f"**❪ <a:CoroaBlack_Mazushi:987731930084704296> ❫ Núcleo. . . ⇢ {perfil_variaveis.get(member.id, {}).get('nucleo', 'Não definido')}**\n"
        "    \n"
        f"**❪ <a:Kanji_Mazushi:987735049225007184> ❫ Força. . . ⇢ {perfil_variaveis.get(member.id, {}).get('forca', 'Não definido')}**\n"
        "    \n"
        f"**❪ <:EscudoDaFuria_Mazushi:987735488083427368> ❫ Defesa Física. . . ⇢ {perfil_variaveis.get(member.id, {}).get('defesa_fisica', 'Não definido')}**\n"
        "    \n"
        f"**❪ <:Escudo_Mazushi:987735575954092093> ❫ Defesa Mágica. . . ⇢ {perfil_variaveis.get(member.id, {}).get('defesa_magica', 'Não definido')}**\n"
        "    \n"
        f"**❪ <a:Raio_Mazushi:987736138884190208> ❫ Velocidade. . . ⇢ {perfil_variaveis.get(member.id, {}).get('velocidade', 'Não definido')}**\n"
        "    \n"
        f"**❪ <:Sword_Mazushi:987736394959048756> ❫ Armas Brancas. . . ⇢ {perfil_variaveis.get(member.id, {}).get('armas_brancas', 'Não definido')}**\n"
        "    \n"
        f"**⊱⋅ ────── ❴ • ✿ • ❵ ────── ⋅⊰**\n"
        "    \n"
        f"**<:Star_Mazushi:987736618494476399> Leia O Sistema De Status!**\n"
        "    \n"
        f"**╰┄┄┄┄┄┄⇢ Status ⇠┄┄┄┄┄┄╯**"
    )

    return mensagem

@bot.command(name="set-hp")
@commands.has_role(1017923437206974584)
async def set_hp(ctx, member: discord.Member, new_hp: float):
      # Passo 6: Utilizar Chave Composta para Identificar as Variáveis de Cada Membro
      id_composto = f"{ctx.guild.id}-{member.id}"

      bot.perfil_variaveis[id_composto] = bot.perfil_variaveis.get(id_composto, {})
      bot.perfil_variaveis[id_composto]['hp'] = new_hp


      new_hp_formatado = "{:.3f}".format(new_hp)

      await ctx.send(f"HP de {member.mention} alterado para {new_hp_formatado}.")


      bot.salvar_variaveis(bot.perfil_variaveis)