Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

146
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda