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

149
Views
TypeError: no se pueden leer las propiedades de undefined (leyendo 'inicio')

Sorteo.js

Recibo este error y no sΓ© cΓ³mo solucionarlo, pero los tutoriales usan lo mismo y no obtienen este error.

Cannot read properties of undefined (reading 'start')

Mi cΓ³digo:

 case 'start': { const gchannel = options.getChannel('channel') || interaction.channel; const duration = options.getString('duration'); const winnerCount = options.getInteger('winners'); const prize = options.getString('prize'); client.giveawaysManager .start(gchannel, { duration: ms(duration), winnerCount, prize, messages: { giveaway: 'πŸŽ‰ **GIVEAWAY STARTED**πŸŽ‰', giveawayEnded: '🎊 **GIVEAWAY ENDED** 🎊', winMessage: 'Congratulations, {winners}! You won **{this.prize}**!', }, }) .then(async () => { successembed.setDescription('giveaway successfully started.'); wait(4000); interaction.reply({ embeds: [successembed], ephemeral: true }); }) .catch((err) => { errorembed.setDescription(`An error has occured \n\`${err}\``); wait(4000); interaction.reply({ embeds: [errorembed], ephemeral: true }); }); }

El error estΓ‘ en:

 client.giveawaysManager.start(gchannel, { duration: ms(duration), winnerCount, prize, messages: { giveaway: 'πŸŽ‰ **GIVEAWAY STARTED**πŸŽ‰', giveawayEnded: '🎊 **GIVEAWAY ENDED** 🎊', winMessage: 'Congratulations, {winners}! You won **{this.prize}**!', }, })
about 4 years ago Β· Juan Pablo Isaza
1 answers
Answer question

0

No es client.giveawaysManager, debe construirse por sΓ­ mismo:

 manager= new GiveawaysManager(client, options(opt), init(opt));

Y luego se llama asΓ­:

 manager.start(gchannel, { duration: ms(duration), winnerCount, prize, messages: { giveaway: 'πŸŽ‰ **GIVEAWAY STARTED**πŸŽ‰', giveawayEnded: '🎊 **GIVEAWAY ENDED** 🎊', winMessage: 'Congratulations, {winners}! You won **{this.prize}**!', }, })

DOC: https://discord-giveaways.js.org/GiveawaysManager.html

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!