Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

140
Visualizações
Autocode - user storage

I have such a problem. I have a command / role where the menu comes out and there admin can choose a certain role for the user who created the command. But the problem is that when someone creates the command second and I want to cast the role to the first user who used the command, then it gives the role to the last user, see photo. Does anyone please know how to solve this problem? Thank youenter image description here

Prefix code:

const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});

const uzivatel = context.params.event.author.id;


await lib.utils.kv.set({
  key: `uzivatel`,
  value: `${context.params.event.author.id}`
});

console.log();

await lib.discord.channels['@0.2.0'].messages.create({
  "channel_id": `${context.params.event.channel_id}`,
  "content": "",
  "tts": false,
  "components": [
    {
      "type": 1,
      "components": [
        {
          "style": 1,
          "label": `Nahodit roli`,
          "custom_id": `poslat`,
          "disabled": false,
          "emoji": {
            "id": null,
            "name": `📧`
          },
          "type": 2
        }
      ]
    }
  ],
  "embeds": [
    {
      "type": "rich",
      "title": "",
      "description": `Zkouška aby vše fungovalo jak ma`,
      "color": 0x00FFFF
    }
  ]
});

Buttons code:

const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});

let uzivatel = await lib.utils.kv.get({
  key: `uzivatel`
});


console.log()
await lib.discord.channels['@0.2.0'].messages.create({
  "channel_id": `${context.params.event.channel_id}`,
  "content":  `Uspesne si nahodil roli: <@${uzivatel}>`,
  "tts": false
});
console.log();

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda