Administrator permissions


I started in twitch development, I want to create an command !add [command] [if the command sends], (basically we can directly add an order without going back in the cod) but I want to add an administrator restriction, but the tmi.js doc was unfortunately deleted and therefore impossible to find.

Thank you for your help

Tmi.js docs:

But for what you’re suggesting though, there’s no such thing as permissions in tmi.js. If you want to have a command that can be used by users to create new commands, then you have to build that yourself, including placing restrictions on what users can do that.

I just want my !add command to be used only by administrators and the broadcaster

By administrators do you mean moderators? If so, you’ll have to create the command yourself and then simply use check a users badges to see if it includes the broadcaster or moderator badge, if it does then let them use the command, if not you simply don’t execute the function.

Okay i will try thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.