Class

Raffle

Raffle()

Picks x amount of winners from the stamp contest. The more stamps a user has, the more chances they have of winning.
Constructor

# new Raffle()

View Source commands/stamps/raffle.js, line 11

Extends

Members

CommandPermissionInfo

# private permissionInfo

The permission info
Overrides:

View Source classes/permission-command.js, line 40

Methods

# async runCommand(botGuild, message, args)

Main function which looks at every member's roles, identifies all that end in a number, and adds the member's id that many times into an array. Then it chooses random numbers and picks the id corresponding to that index until it has numberOfWinners unique winners.
Parameters:
Name Type Description
botGuild BotGuildModel
message Message message used to call the command
args Object
numberOfWinners integer number of winners to be drawn
Overrides:

View Source commands/stamps/raffle.js, line 45