Skip to content

Commit

Permalink
chore(feature flags): more feature flags, closes #294
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobiah committed Jan 26, 2020
1 parent 491a892 commit 3277b81
Show file tree
Hide file tree
Showing 23 changed files with 25 additions and 23 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ FUN | Fun stuff, like 8Ball and corgis | ✗
WARFRAME | Warframe functionality, like tracking and Warframe informational Commands | ✗
DESTINY2 | For an in-progress section allowing people to expand Genesis into Destiny 2 | ✗
GIVEAWAYS | Giveaway functionality | ✗
CUST_CMDS | Custom commands - user-generated simple commands | ✗
ROOMS | Automated & manual room creation | ✗
### Setting up Twitch
Expand Down
2 changes: 1 addition & 1 deletion src/commands/CustomCommands/AddCustomCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Command = require('../../models/Command.js');

class AddCustomCommand extends Command {
constructor(bot) {
super(bot, 'customcommands.add', 'add cc', 'UTIL');
super(bot, 'customcommands.add', 'add cc', 'CUST_CMDS');
this.usages = [
{ description: 'Add a custom command', parameters: ['command call', 'command response'] },
];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/CustomCommands/DeleteCustomCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Command = require('../../models/Command.js');

class DeleteCustomCommand extends Command {
constructor(bot) {
super(bot, 'customcommands.delete', 'delete cc', 'UTIL');
super(bot, 'customcommands.delete', 'delete cc', 'CUST_CMDS');
this.usages = [
{ description: 'Delete a custom command', parameters: ['command call'] },
];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/CustomCommands/ListCustomCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { createGroupedArray, setupPages } = require('../../CommonFunctions.js');

class ListCustomCommand extends Command {
constructor(bot) {
super(bot, 'settings.cc.list', 'list cc', 'List custom commands for this guild', 'UTIL');
super(bot, 'settings.cc.list', 'list cc', 'List custom commands for this guild', 'CUST_CMDS');
this.requiresAuth = false;
this.allowDM = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/CustomCommands/PingCustomCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { getChannel } = require('../../CommonFunctions.js');

class PingCustomCommand extends Command {
constructor(bot) {
super(bot, 'settings.cc.ping', 'ping cc', 'Toggle whether or not custom commands mention either the user or the mentioned person.', 'UTIL');
super(bot, 'settings.cc.ping', 'ping cc', 'Toggle whether or not custom commands mention either the user or the mentioned person.', 'CUST_CMDS');
this.usages = [
{ description: 'Change if this channel\'s use custom commands will ping', parameters: ['custom commands enabled'] },
];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/CustomCommands/UpdateCustomCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const allowedParams = ['call', 'response'];

class UpdateCustomCommand extends Command {
constructor(bot) {
super(bot, 'customcommands.update', 'update cc', 'UTIL');
super(bot, 'customcommands.update', 'update cc', 'CUST_CMDS');
this.usages = [
{ description: 'Update a custom command', parameters: ['param', 'command call', 'new param value'] },
];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/AllowRoomCreation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Command = require('../../models/Command.js');

class AllowPrivateRoom extends Command {
constructor(bot) {
super(bot, 'settings.allowprivateroom', 'allow private room', 'Set whether or not to allow the bot to create private rooms.', 'UTIL');
super(bot, 'settings.allowprivateroom', 'allow private room', 'Set whether or not to allow the bot to create private rooms.', 'ROOMS');
this.usages = [
{ description: 'Change if the bot is allowed to create private channels', parameters: ['private rooms allowed'] },
];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/Create.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Create extends Command {
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'rooms.create', 'create', 'Create a temporary room.', 'UTIL');
super(bot, 'rooms.create', 'create', 'Create a temporary room.', 'ROOMS');
this.regex = new RegExp(`^${this.call}\\s?(room|raid|team|chat)?(\\w|-)?(?:-n(.+))?(--no-text)?(--public)?(--text)?(--hidden)?(--shown)?`, 'i');

this.usages = [
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/Destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Destroy extends Command {
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'rooms.destry', 'destroy room', 'Destry user\'s temp room.', 'UTIL');
super(bot, 'rooms.destry', 'destroy room', 'Destry user\'s temp room.', 'ROOMS');
this.regex = new RegExp(`^${this.call}$`, 'i');
this.usages = [];
this.allowDM = false;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/Hide.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Hide extends Command {
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'rooms.hide', 'hide', 'Hide temp room', 'UTIL');
super(bot, 'rooms.hide', 'hide', 'Hide temp room', 'ROOMS');
this.regex = new RegExp(`^${this.call}$`, 'i');
this.usages = [];
this.allowDM = false;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/Invite.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Invite extends Command {
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'rooms.invite', 'invite', 'Invite user to temp room', 'UTIL');
super(bot, 'rooms.invite', 'invite', 'Invite user to temp room', 'ROOMS');
this.regex = new RegExp(`^${this.call}`, 'i');
this.usages = [];
this.allowDM = false;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/Lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Lock extends Command {
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'rooms.lock', 'lock', 'Lock temp room', 'UTIL');
super(bot, 'rooms.lock', 'lock', 'Lock temp room', 'ROOMS');
this.regex = new RegExp(`^${this.call}$`, 'i');
this.usages = [];
this.allowDM = false;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/Lurkable.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Show extends Command {
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'rooms.lurk', 'lurk', 'Make room lurkable. Users can join, see, and listen, but not write.', 'UTIL');
super(bot, 'rooms.lurk', 'lurk', 'Make room lurkable. Users can join, see, and listen, but not write.', 'ROOMS');
this.regex = new RegExp(`^${this.call}$`, 'i');
this.usages = [];
this.allowDM = false;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/Rename.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Rename extends Command {
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'rooms.rename', 'rename room', 'Rename user\'s temp room.', 'UTIL');
super(bot, 'rooms.rename', 'rename room', 'Rename user\'s temp room.', 'ROOMS');
this.regex = new RegExp(`^${this.call}\\s?(.+)?`, 'i');
this.usages = [];
this.allowDM = false;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/ResizeRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Resize extends Command {
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'rooms.resize', 'resize room', 'Resize temp room', 'UTIL');
super(bot, 'rooms.resize', 'resize room', 'Resize temp room', 'ROOMS');
this.regex = new RegExp(`^${this.call}\\s?(\\d+)`, 'i');
this.usages = [];
this.allowDM = false;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Rooms/RoomDefaultNoText.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ const Command = require('../../models/Command.js');

class RoomUnlockedDefault extends Command {
constructor(bot) {
super(bot, 'settings.defaultNoText', 'set rooms notext', 'Set whether or not to the bot should default rooms to being unlocked (public).', 'UTIL');
super(bot, 'settings.defaultNoText', 'set rooms notext', 'Set whether or not to the bot should default rooms to creating text channels.', 'ROOMS');
this.usages = [
{ description: 'Change if the bot should create unlocked channels by default (defaults to off)', parameters: ['private notext defaulted'] },
{ description: 'Change if the bot should create accompanying text channels by default (defaults to off)', parameters: ['private notext defaulted'] },
];
this.regex = new RegExp(`^${this.call}\\s?(on|off)?$`, 'i');
this.requiresAuth = true;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/RoomPublicDefault.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Command = require('../../models/Command.js');

class RoomUnlockedDefault extends Command {
constructor(bot) {
super(bot, 'settings.defaultroomsunlocked', 'set rooms unlocked', 'Set whether or not to the bot should default rooms to being unlocked (public).', 'UTIL');
super(bot, 'settings.defaultroomsunlocked', 'set rooms unlocked', 'Set whether or not to the bot should default rooms to being unlocked (public).', 'ROOMS');
this.usages = [
{ description: 'Change if the bot should create unlocked channels by default (defaults to off)', parameters: ['private rooms defaulted'] },
];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/RoomShownDefault.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Command = require('../../models/Command.js');

class RoomShownDefault extends Command {
constructor(bot) {
super(bot, 'settings.defaultroomsshown', 'set rooms shown', 'Set whether or not to the bot should default rooms to being unlocked (public).');
super(bot, 'settings.defaultroomsshown', 'set rooms shown', 'Set whether or not to the bot should default rooms to being shown.', 'ROOMS');
this.usages = [
{ description: 'Change if the bot should create shown channels by default (defaults to off)', parameters: ['shown rooms defaulted'] },
];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/SetDefaultCategory.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Command = require('../../models/Command.js');

class SetDefaultCategory extends Command {
constructor(bot) {
super(bot, 'settings.defaultcategory', 'set rooms category', 'Set whether or not to the bot should default rooms to being unlocked (public).', 'UTIL');
super(bot, 'settings.defaultcategory', 'set rooms category', 'Set whether or not to the bot should default rooms to being unlocked (public).', 'ROOMS');
this.usages = [
{ description: 'Change the bot\'s default category for temp rooms. Defaults to none.', parameters: ['temp room default'] },
];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/Show.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Show extends Command {
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'rooms.show', 'show', 'Show temp room', 'UTIL');
super(bot, 'rooms.show', 'show', 'Show temp room', 'ROOMS');
this.regex = new RegExp(`^${this.call}$`, 'i');
this.usages = [];
this.allowDM = false;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Rooms/Unlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Unlock extends Command {
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'rooms.unlock', 'unlock', 'Unlock temp room', 'UTIL');
super(bot, 'rooms.unlock', 'unlock', 'Unlock temp room', 'ROOMS');
this.regex = new RegExp(`^${this.call}$`, 'i');
this.usages = [];
this.allowDM = false;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Settings/AllowCustomCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { getChannel } = require('../../CommonFunctions.js');

class AllowCustomCommands extends Command {
constructor(bot) {
super(bot, 'settings.allowCustom', 'allow custom commands', 'Toggle whether or not custom commands are allowed here.', 'CORE');
super(bot, 'settings.allowCustom', 'allow custom commands', 'Toggle whether or not custom commands are allowed here.', 'CUST_CMDS');
this.usages = [
{ description: 'Change if this channel can use custom commands', parameters: ['custom commands enabled'] },
];
Expand Down
2 changes: 1 addition & 1 deletion src/models/CustomCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CustomCommand extends Command {
* @param {string} guildId Guild id for the guild it was created in
*/
constructor(bot, call, response, guildId) {
super(bot, `custom.${call}`, call, `A custom command responding ${response} to ${call}`);
super(bot, `custom.${call}`, call, `A custom command responding ${response} to ${call}`, 'CUST_CMDS');
this.isCustomCommand = true;
this.response = response;
this.guildId = guildId;
Expand Down

0 comments on commit 3277b81

Please sign in to comment.