Class

StartTeamRoulette

StartTeamRoulette()

The team roulette activity is a special type of team formation activity. Users can join the activity by reacting to a message embed (console). They can join as a solo or a group of up to 3 members (them included). The bot will then create teams of 4 as they become available. When a team is created, the new team members are invited to a text channel only available to them. Users can leave the team and the bot will add a new member from the list (if any available). Admins can check the list of users waiting on a team by reacting to a message embed (console) sent to the admin channel.

Extends

Members

Collection.<Snowflake, User>

# participants

All the users that have participated in the activity.

View Source commands/a_start_commands/start-team-roulette.js, line 75

CommandPermissionInfo

# private permissionInfo

The permission info
Overrides:

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

String

# soloEmoji

The solo join emoji.

View Source commands/a_start_commands/start-team-roulette.js, line 51

String

# teamEmoji

The non solo join emoji.

View Source commands/a_start_commands/start-team-roulette.js, line 57

Collection.<Number, Array.<Team>>

# teamList

The team list from which to create teams.

View Source commands/a_start_commands/start-team-roulette.js, line 63

Number

# teamNumber

The current team number.

View Source commands/a_start_commands/start-team-roulette.js, line 69

TextChannel

# textChannel

Channel used to send information about team roulette.

View Source commands/a_start_commands/start-team-roulette.js, line 81

Methods

# async assignGroupOf2() → {Promise.<(Team|null)>}

Will assign a team of 2 with a team of 2 or two of 1

View Source commands/a_start_commands/start-team-roulette.js, line 438

  • module:this.groupList
Promise.<(Team|null)>

# async assignGroupOf3() → {Promise.<(Team|null)>}

Will assign a team of 3 with a team of 1.

View Source commands/a_start_commands/start-team-roulette.js, line 425

  • module:this.groupList
Promise.<(Team|null)>

# async assignGroupsOf1() → {Promise.<(Team|null)>}

Assigns 4 groups of 1 together.

View Source commands/a_start_commands/start-team-roulette.js, line 454

Promise.<(Team|null)>

# async getOrCreateChannel(promptChannel, promptId, guildChannelManager) → {Promise.<TextChannel>}

Ask user if new channels are needed, if so create them, else ask for current channels to use for TR.
Parameters:
Name Type Description
promptChannel TextChannel channel to prompt on
promptId Snowflake user's ID to prompt
guildChannelManager GuildChannelManager manager to create channels

View Source commands/a_start_commands/start-team-roulette.js, line 261

Throws an error if the user cancels either of the two Prompts, the command should quit!
Promise.<TextChannel>

# removeMemberFromTeam(team, teamMember) → {Number}

Will remove the team member from the team, notify the user of success, and remove the team from the teamList
Parameters:
Name Type Description
team Team the team to remove user from
teamMember User the user to remove from the team

View Source commands/a_start_commands/start-team-roulette.js, line 330

- the new size of the team
Number

# async runCommand(botGuild, message)

Parameters:
Name Type Description
botGuild BotGuildModel
message Message the message in which the command was run
Overrides:

View Source commands/a_start_commands/start-team-roulette.js, line 43

# async runTeamCreator(channelManager)

Will try to create a team and set them up for success!
Parameters:
Name Type Description
channelManager GuildChannelManager

View Source commands/a_start_commands/start-team-roulette.js, line 349