Is there anyone to make it so a certain user cant use a command?

Asked Aug 15, 2021·2 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

I have a command that I want most people to use except for a select few.

Is there any code I can add so it doesn't trigger when they type !command

Without using regular only cause you need to add them individually

2 replies

You can restrict a command based on userlevel, or use regulars to control who does and doesn't have access to commands.

If you want to do it without the use of regulars your best bet would be this:

$(eval List=[`User1`,`User2`,`UserX`…];List.includes(`$(user)`.toLowerCase())?`Response`:` `)

Put all the usernames in lowercase.

If you need any further elaboration please feel free to ask.