Rulesets and Discoid

Learn about how powerful rulesets are.

Ever since the dawn of the original Discoid, a dynamic permission system has been highly requested. We have always promised we will eventually release a feature we called “rulesets.” With discoid2, we can finally do such a thing.

Rulesets are literally sets of rules about whether or not a user should be able to run a command. Each rule is designated to a specified command. Rulesets can forbid specific roles from using a command, allow only a specific role to use a command, or completely disable a command in a specific channel.

With the power of rulesets, you could disable potentially annoying commands like \cat or \slots in on-topic discussions like #general. Perhaps you would like to allow Prune to only be run by users with the role “Pruner.” Maybe you want a role that could be given to those with a warning; a consequence could be no fun Discoid commands!

This is all doable with rulesets. Best part is: they’re not too hard!

How do I do that?

Let’s start with the basics. Use the command \ruleset view. This will show you the current ruleset being used by your server.

This is what you should see when you run the command.

You’ll notice there’s no ruleset. That’s good.

For this example, make sure you have a channel called #general. Let’s examine the following rule and have Discoid explain it for us:


To add a rule, use \ruleset change. You’ll be prompted to select from the options set, append, and remove. For now, choose append. Discoid will then ask you what you would like to append to the current ruleset. Copy and paste the above bolded rule into the chat. Discoid will ask to confirm this. Confirm by replying with y.

Setup of the above rule.

Now that you’ve added the rule, use \ruleset view again. You’ll notice Discoid now explains specifically what this rule does.

The result of adding the rule and viewing it with \ruleset view.

Let’s pick apart this rule and see what’s happening:

  1. [] indicate rules. They surround them.
  2. cat: lets Discoid know which command this rule will target.
  3. !#general means this command cannot (!) be run in the channel #general.

Pretty simple, right? The basics of rulesets require you to know that ! means not, which is pretty straightforward.

This rule, however, doesn’t show the power of roles. Let’s create a bigger example, combining what we learned earlier with roles. Let’s make a role so that the command slots cannot be run by any normal person, but by only those who have the Slot Enthusiast role. Additionally, slots cannot be run in the #general channel. It looks something like this:

[slots:!#general,!e,slot enthusiast]

It got longer! No need to worry, for everything you need to know is separated by commas. Add this rule the same way you added the previous one. Let’s view the ruleset now that we have this new rule and see what it looks like.

Discoid’s response after having added the slots rule.

The view command will list through all of your rules currently active on the server. You can easily remove any of them by choosing remove upon being asked when using \ruleset change. Let’s experiment with this rule now.

For this example, I have given myself my own Slot Enthusiast role, but have not given it to Hallucinater, as seen in the following image:

Poor Hallucinater.

Behold, the power of rulesets! Let’s explain it again:

  1. Same rudimentary task of defining a rule with [command: ].
  2. Same channel exclusion as before.
  3. !e means not everyone can use this command.
  4. Deliberately stating the role, slot enthusiast, causes Discoid to see it as a role that should be allowed to use this command.

As a result, we can completely disable specific commands for specific people in specific locations. This feature was highly requested, and is finally here.

If you have further questions regarding rulesets or you have a suggestion for Discoid, contact someone in Discoid Central! We’re always listening.

Happy rulesetting! Wait, is that a thing? It is now!

Like what you read? Give voximity a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.