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

163
Views
Giveaway not started even after using start command

I'm currently doing a bot project, and having a giveaway feature, so basically I do p!start

the bot only send "Giveaway started in (channel name)"

but not showing the message regarding the giveaway

Here's my code, any solution for this, appreciate for your time

run: async (bot, message, args) => {
    if(!message.member.hasPermission('MANAGE_MESSAGES') && !message.member.roles.cache.some((r) => r.name === "Giveaways")){
     return message.channel.send(':x: You need to have the manage messages permissions to start giveaways.');
 }
 let giveawayChannel = message.mentions.channels.first();
 if(!giveawayChannel){
     return message.channel.send(':x: You have to mention a valid channel!');
 }

 let giveawayDuration = args[1];
 if(!giveawayDuration || isNaN(ms(giveawayDuration))){
     return message.channel.send(':x: You have to specify a valid duration!');
 }

 let giveawayNumberWinners = args[2];
 if(isNaN(giveawayNumberWinners) || (parseInt(giveawayNumberWinners) <= 0)){
     return message.channel.send(':x: You have to specify a valid number of winners!');
 }

 let giveawayPrize = args.slice(3).join(' ');
 if(!giveawayPrize){
     return message.channel.send(':x: You have to specify a valid prize!');
 }

 bot.giveawaysManager.start(giveawayChannel, {
     
     time: ms(giveawayDuration),
     prize: giveawayPrize,
     winnerCount: giveawayNumberWinners,
     hostedBy: message.author,
     message: {
         giveaway: "๐ŸŽ‰๐ŸŽ‰ **GIVEAWAY** ๐ŸŽ‰๐ŸŽ‰",
         giveawayEnded: "๐ŸŽ‰๐ŸŽ‰ **GIVEAWAY ENDED** ๐ŸŽ‰๐ŸŽ‰",
         timeRemaining: "Time remaining: **{duration}**!",
         inviteToParticipate: "React with ๐ŸŽ‰ to participate!",
         winMessage: "Congratulations, {winners}! You won **{prize}**!",
         embedFooter: "Giveaways",
         noWinner: "Giveaway cancelled, no valid participations.",
         hostedBy: "Hosted by: {user}",
         winners: "winner(s)",
         endedAt: "Ended at",
         units: {
             seconds: "seconds",
             minutes: "minutes",
             hours: "hours",
             days: "days",
             pluralS: false     
         }
     }
 });

}
 message.channel.send(`Giveaway started in ${giveawayChannel}!`);

 }
}
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!