Is User Collaborator

Check if a user is a collaborator of the bot.

Inputs

User ID

Discord User ID to check.

Outputs

This block does not have any outputs.

\

How it works

To use the Is User Collaborator block, simply put the ID of the user you wish to check inside the spot designated as User ID. This block acts like an If Statement but the conditional only checks to see if the reference user is a collaborator on the bot. A few examples and tricks are below

Exclude collaborators

In this example, the Is User Collaborator block is set up to only let people continue if they are not a bot collaborator

Collaborator Boolean

This set up takes a little bit more work to make functional but allows for more usage of the block including use in If Statements and Advanced Conditionals

By setting the value of the Create Local Variable to false, you can create a Boolean which is only turned true when the reference user is a collaborator. You can expand on this to make collaborator only logic where options or actions are only performed when the reference user is a collaborator

Collaborator only logic (testing mode)

By simply adding 3 blocks to the bottom of the image above, you can make a conditional to send a text reply and exit the flow if the executing user is not a collaborator

This works because the Is User Collaborator does not execute because the user is not a collaborator (leaving the local variable as false) so it doesn’t get updated to true meaning the If Statement executes telling the user they are not a bot collaborator then exits the flow early