Constructor
# new Activity(ActivityInfo)
Constructor for an activity, will create the category, voice and text channel.
Parameters:
Name | Type | Description |
---|---|---|
ActivityInfo |
ActivityInfo |
Members
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 |
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 |
# protected addDefaultFeatures()
Adds the default features to the activity, these features are available to all activities.
# 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 |
# async delete()
Delete all the channels and the category. Remove the workshop from firebase.
# 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 |
# async init() → {Promise.<Activity>}
Initialize this activity by creating the channels, adding the features and sending the admin console.
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 |
# 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 |
# 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 |
# 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 |