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

200
Views
El código de Discord.js v12 se rompe al actualizar a v13

Al actualizar mi discord.js a v13, recibo muchos errores:

 //member.hasPermission is not a function member.hasPermission("SEND_MESSAGES") //Cannot send an empty message channel.send(someEmbed) //Cannot send an empty message channel.send({embed: someEmbed}) //Warning: The 'message' event was deprecated, use 'messageCreate' instead client.on("message", msg => {}) //Cannot send an empty message channel.send(user) //[CLIENT_MISSING_INTENTS] Valid intents must be provided for the client const client = new Client() //channel.join is not a function await channel.join()

Estos no suceden en v12, entonces, ¿cómo los soluciono en v13?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Discord.js v13 tiene muchos cambios, y esos son solo algunos. Antes de actualizar a v13, debe cambiar las siguientes cosas

 //member.hasPermission("SEND_MESSAGES") member.permissions.has("SEND_MESSAGES") //channel.send(someEmbed) / channel.send({embed: someEmbed}) channel.send({ embeds: [someEmbed] }) //make sure it's an array! //client.on("message", msg => {}) client.on("messageCreate", msg => {}) //channel.send(user) channel.send(user.toString()) //const client = new Client() const { Intents, Client } = require("discord.js") const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]}) //more intents may be provided //await channel.join() const { joinVoiceChannel } = require("@discordjs/voice") //requires installation joinVoiceChannel({ channelId: channel.id, guildId: guild.id, adapterCreator: guild.voiceAdapterCreator })

Hay algunos cambios más. Puedes verlos en la guía.

about 4 years ago · Juan Pablo Isaza Report
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!