Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on("message", (message) => {
- const ms = require("ms"); // npm install ms
- const args = message.content.slice(client.prefix.length).trim().split(/ +/g);
- const command = args.shift().toLowerCase();
- if(command === "giveaway"){
- // g!start-giveaway 2d 1 Awesome prize!
- // will create a giveaway with a duration of two days, with one winner and the prize will be "Awesome prize!"
- client.giveawaysManager.start(message.channel, {
- time: ms(args[0]),
- prize: args.slice(2).join(" "),
- winnerCount: parseInt(args[1]),
- messages: {
- giveaway: "@everyone\n\nšš **GIVEAWAY** šš",
- giveawayEnded: "@everyone\n\nšš **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.",
- winners: "winner(s)",
- endedAt: "Ended at",
- units: {
- seconds: "seconds",
- minutes: "minutes",
- hours: "hours",
- days: "days",
- pluralS: false // Not needed, because units end with a S so it will automatically removed if the unit value is lower than 2
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement