Class

Activity

Activity(ActivityInfo)

An activity is a overarching class for any kind of activity. An activity consists of a category with voice and text channels. Activities have features admins can run from the admin console by reacting to a message (console). The activity can be private to specified roles or public to all users.
Constructor

# new Activity(ActivityInfo)

Constructor for an activity, will create the category, voice and text channel.
Parameters:
Name Type Description
ActivityInfo ActivityInfo

View Source classes/activities/activity.js, line 41

Members

Console

# adminConsole

The admin console with activity features.

View Source classes/activities/activity.js, line 99

BotGuildModel

# botGuild

The mongoose BotGuildModel Object

View Source classes/activities/activity.js, line 110

Guild

# guild

The guild this activity is in.

View Source classes/activities/activity.js, line 87

string

# name

The name of this activity.

View Source classes/activities/activity.js, line 81

Room

# room

The room this activity lives in.

View Source classes/activities/activity.js, line 93

Methods

# async static promptForRoleParticipants(channel, userId, isStaffAutoopt) → {Promise.<Collection.<String, Role>>}

Prompts a user for the roles that can have access to an activity.
Parameters:
Name Type Attributes Default Description
channel TextChannel the channel to prompt in
userId String the user id to prompt
isStaffAuto Boolean <optional>
false true if staff are added automatically

View Source classes/activities/activity.js, line 52

Promise.<Collection.<String, Role>>

# async addChannel(channel, userId)

Add a channel to the activity, prompts user for info and name.
Parameters:
Name Type Description
channel TextChannel channel to prompt user for specified voice channel
userId String user to prompt for specified voice channel

View Source classes/activities/activity.js, line 213

# protected addDefaultFeatures()

Adds the default features to the activity, these features are available to all activities.

View Source classes/activities/activity.js, line 137

# async archive(archiveCategory)

Archive the activity. Move general text channel to archive category, remove all remaining channels and remove the category.
Parameters:
Name Type Description
archiveCategory CategoryChannel the category where the general text channel will be moved to

View Source classes/activities/activity.js, line 267

# async delete()

Delete all the channels and the category. Remove the workshop from firebase.

View Source classes/activities/activity.js, line 279

# async distributeStamp(channel, userId)

Will let hackers get a stamp for attending the activity.
Parameters:
Name Type Description
channel TextChannel channel to prompt user for specified voice channel
userId String user to prompt for specified voice channel

View Source classes/activities/activity.js, line 369

# async init() → {Promise.<Activity>}

Initialize this activity by creating the channels, adding the features and sending the admin console.

View Source classes/activities/activity.js, line 121

Promise.<Activity>

# async removeChannel(channel, userId)

Removes a channel from the activity, the user will decide which. Wont delete channels in the safeChannel map.
Parameters:
Name Type Description
channel TextChannel channel to prompt user for specified voice channel
userId String user to prompt for specified voice channel

View Source classes/activities/activity.js, line 243

# async roleShuffle(channel, userId)

Shuffles users with a specific role throughout the activity's voice channels
Parameters:
Name Type Description
channel TextChannel channel to prompt user for specified voice channel
userId String user to prompt for specified voice channel

View Source classes/activities/activity.js, line 354

# async ruleValidation(channel, userId)

Will lock the channels behind an emoji collector.
Parameters:
Name Type Description
channel TextChannel channel to prompt user for specified voice channel
userId String user to prompt for specified voice channel

View Source classes/activities/activity.js, line 424

# async voiceCallBack(channel, userId)

Move all users back to a specified voice channel from the activity's voice channels.
Parameters:
Name Type Description
channel TextChannel channel to prompt user for specified voice channel
userId String user to prompt for specified voice channel

View Source classes/activities/activity.js, line 292