Skip to content

Instantly share code, notes, and snippets.

@ipetermac
Last active February 15, 2021 04:20
Show Gist options
  • Save ipetermac/6a0e6f250ec61ae46d5407dbe4bc419c to your computer and use it in GitHub Desktop.
Save ipetermac/6a0e6f250ec61ae46d5407dbe4bc419c to your computer and use it in GitHub Desktop.
Carl-bot Custom Tag - Junior Admin
{=(comment):
- I'm decided to create custom tag for Jr. Admin with minimum allowed commands and bypass command in single tag.
- The tag allow certain role to run moderator commands without granting them discord manage role perms.
- The role hierarchy always apply, Jr. Admin can't managed those people who has higher role.
- Please read the comment inside the Tagscript, and do update what necessary.
- Usage -jadmin command syntax (replace - with your bot prefix)
- Example : -jadmin mute @member 1d spamming copypasta
- Moderation docs - https://docs.carl.gg/moderation/moderation/
- Screen shot : https://imgur.com/Z4GyRi4, https://imgur.com/H9H18Zh
- Import Link : https://carl.gg/t/599092 OR https://pastebin.com/yYSCRXfR}
{=(author):fsociety#1200}
{=(credit):UAT Environment}
{=(comment):error message for no authorized use}
{var(perms.error):**Junior Admin** Only}
{=(comment):Jr Admin role IDs, replace with your own role id and saparate by comma}
{var(junior.admin):809264576666927104}
{require({perms.error}):{junior.admin}}
{=(comment):allowed command list, add more if need saparate by space}
{var(cmd.permit):warn mute unmute warns removewarn clearwarn}
{=(comment):error message when first args is empty or unmatch with the allowed commands list}
{var(cmd.error):Authorized cmd - `{replace( ,, ):{cmd.permit}}`}
{=(comment):lower first args capitalize to match the validation}
{var(cmd.input):{lower:{args(1)}}}
{=(comment):validate input and react with emoji if its true}
{var(emoji):{if({contains({cmd.input}):{cmd.permit}}==true):✅}}
{reactu:{emoji}}
{=(comment):validate input if false then return an error, code snipped by Chelsie#2507}
{var():}{{if({contains({cmd.input}):{cmd.permit}}==false):blacklist({cmd.error}):{server(id)}}}
{=(comment):This instructs the tag to act as if the tag user has the modrole}
{override}
{=(comment):This is the main command}
{cmd:{args}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment