Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

653
Views
AxiosError: la solicitud falló con el código de estado 401

Estoy trabajando en un comando de banner de usuario que está en discord.js v13 y aparece este error y no tengo idea de cómo puedo solucionarlo.

Error: https://i.stack.imgur.com/xuFXB.png

CÓDIGO:

 const { Discord, MessageEmbed } = require(`discord.js`); const axios = require(`axios`) module.exports = { name: "UserBanner", category: "🔰 Information", permissions: ["SEND_MESSAGES"], aliases: ["userbanner", "memberbanner"], usage: "userbanner <@user>", description: "Get the Banner of a user", run: async (client, message, args) => { let user = message.mentions.users.first() || client.users.cache.get(args[0]) || message.author; try { const data = await axios.get(`https://discord.com/api/users/${user.id}`, { headers: { Authorization: `Bot: ${client.token}` } }).then(d => d.data); if(data.banner){ let url = data.banner.startsWith("a_") ? ".gif?size=4096" : ".png?size=4-96"; url = `https://cdn.discordapp.com/baners*${user.id}/${data.banner}${url}`; let avatar = user.displayAvatarURL({ dynamic: true}) let embed = new MessageEmbed() .setColor(`#ffffff`) .setTitle(`${user.tag} banner`) .setImage(url) .setThumbnail(avatar) message.channel.send({ embeds: [embed]}) } else { message.channel.send({ content: `<a:mark_rejected:975425274487398480> **Has no Banner!**`}) }; } catch(err){ console.log(err) } } }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!