Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. client.on("message", (message) => {
  2.  
  3. const ms = require("ms"); // npm install ms
  4. const args = message.content.slice(client.prefix.length).trim().split(/ +/g);
  5. const command = args.shift().toLowerCase();
  6.  
  7. if(command === "giveaway"){
  8. // g!start-giveaway 2d 1 Awesome prize!
  9. // will create a giveaway with a duration of two days, with one winner and the prize will be "Awesome prize!"
  10.  
  11. client.giveawaysManager.start(message.channel, {
  12. time: ms(args[0]),
  13. prize: args.slice(2).join(" "),
  14. winnerCount: parseInt(args[1]),
  15. messages: {
  16. giveaway: "@everyone\n\nšŸŽ‰šŸŽ‰ **GIVEAWAY** šŸŽ‰šŸŽ‰",
  17. giveawayEnded: "@everyone\n\nšŸŽ‰šŸŽ‰ **GIVEAWAY ENDED** šŸŽ‰šŸŽ‰",
  18. timeRemaining: "Time remaining: **{duration}**!",
  19. inviteToParticipate: "React with šŸŽ‰ to participate!",
  20. winMessage: "Congratulations, {winners}! You won **{prize}**!",
  21. embedFooter: "Giveaways",
  22. noWinner: "Giveaway cancelled, no valid participations.",
  23. winners: "winner(s)",
  24. endedAt: "Ended at",
  25. units: {
  26. seconds: "seconds",
  27. minutes: "minutes",
  28. hours: "hours",
  29. days: "days",
  30. pluralS: false // Not needed, because units end with a S so it will automatically removed if the unit value is lower than 2
  31. }
  32. }
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement