Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

138
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda