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

255
Vistas
js does not see the second number

If I try to approve bug 11, it approves bug 1. Please help solve this problem bot, does not perceive numbers consisting of two digits at all


    client.on('message', async (message, member, channel) => {
    
      if (!message.content.startsWith(prefix) || message.author.bot) return;
      var args = message.content.slice(prefix.length).split(/ +/);
      const command = args.shift().toLowerCase();
      args = args.join(" ");
      let perms = message.member.permissions;
    
      if (command === 'accept') {
        const user = await message.guild.members.cache.get(message.author.id)
        if (!user.roles.cache.get(ApprovoredRoleID)) return message.reply('Доступно только охотникам за багами')
        if (!args[0]) return message.reply('Укажите Bug-ID')
        var SelectBug = await BugScheme.findOne({ id: args[0] });
        if (!SelectBug) return message.reply('Я не могу найти идентификатор отчета.')
        if (SelectBug.reportStatus != 'none') return message.reply('Этот отчет уже перемещен.')
        var bug = client.channels.cache.get(BugsChannel)
        bug.messages.fetch({around: SelectBug.messageid, limit: 1})
          .then(msg => {
            const fetchedMsg = msg.first();
            fetchedMsg.edit(`**───────────────────**\n<@${SelectBug.owner}> сообщил\n\n**Название:** ${SelectBug.title}\n**Описание:** ${SelectBug.description}\n\nПроверил ${message.author} <:yes:917708321056768000>\nID отчета: **${SelectBug.id}**`);
        });
        SelectBug.reportStatus = 'accept'
        SelectBug.save()

mongo

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

This is because you are only getting the first character of the string. Remove args = args.join(" ") and do this instead:

var SelectBug = await BugScheme.findOne({ id: args.join("") })
about 4 years ago · Santiago Gelvez Denunciar
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