Guard
Gives access to individual commands only to admins.
Initial setup:
  • Install Library
  • Сreate /setup command:
1
Libs.Guard.setup();
Copied!
You will have such admin panel:
  • Create the @ command or add to an existing one the following code (at the very beginning):
1
if (!Libs.Guard.verifyAccess()) return;
Copied!
Add the commands you want to restrict access to to the "admins" folder (by default).
You can add/remove admins, change the folder for admin commands and add a command for unauthorized access attempts in the admin panel:
App > Bot > Admin Panels > Guard.
Copy link