Androz2091 / discord-giveaways

πŸŽ‰ Complete framework to facilitate the creation of giveaways using discord.js
https://discord-giveaways.js.org
MIT License
333 stars 128 forks source link

Still send @everyone when I removed the @everyone in the settings. #2

Closed ghost closed 5 years ago

ghost commented 5 years ago

const Discord = require("discord.js"); const giveaways = require("discord-giveaways"); const ms = require("ms");

module.exports.run = async (bot, message, args) => { message.delete() if (!message.member.roles.some(role => role.name === 'giveaway')) return message.channel.send("Hey! you need the giveaway role!") if(!args[0])return message.reply("Time plz! (example: 1d (1 day)/1 m (1 minute)/ 1 h (1 hour) / 1s (1s))");

if(!args[1])return message.channel.send("Wrong! How many winners? d>help giveaway for more") if(isNaN(args[1]))return message.channel.send("What? Idk, not a number? The winner is not a number") if(!args[2])return message.channel.send("What's the prize?")

giveaways.start(message.channel, { time: ms(args[0]), prize: args.slice(2).join(" "), winnersCount: parseInt(args[1]), messages: { giveaway: "πŸŽ‰πŸŽ‰ GIVEAWAY πŸŽ‰πŸŽ‰", giveawayEnded: "πŸŽ‰πŸŽ‰ GIVEAWAY ENDED πŸŽ‰πŸŽ‰", timeRemaining: "Time remaining: {duration}!", inviteToParticipate: "React with πŸŽ‰ to participate!", winMessage: "Congratulations, {winners}! You won {prize}!", embedFooter: "DerpBot Giveaways", noWinner: "Giveaway cancelled, no valid participations.", winners: "winner(s)", endedAt: "Ended at", units: { seconds: "seconds", minutes: "minutes", hours: "hours", days: "days" } } });

}

module.exports.config = { name: "giveaway", aliases: ["gift"], description: "Giveaway :D", usage: "d>giveaway

ready events giveaways.launch(bot, { updateCountdownEvery: 3000, botsCanWin: false, ignoreIfHasPermission: [

    ],
    embedColor: "#00FFFF",
    reaction: "πŸŽ‰"
});

Join this to test it

ghost commented 5 years ago

Join this to test it

Androz2091 commented 5 years ago

Hello, I just published an update of the module that fixes this bug, so you need to update it with npm install discord-giveaways for it to work properly. Have a good day!

ghost commented 5 years ago

Thx

Jujugin commented 4 years ago

Hello, I installed the giveaway bot module as well as the code that goes with and at the end of the giveaway even if there are more than 10 people "Giveaway canceled, no valid participations." can someone help me?

Androz2091 commented 4 years ago

@Justin2528 open a new issue