punish

A punishment tag made for the BDFD server, it's used to apply punishment roles (temproles) to member and log it in the mod logs channel. Correct syntax: ?punish <role> <user> [time] <reason> Roles: `support`, `bot`, `wiki`, `points`, `vcpoints`, `events`, `suggestions`

Private

Content

72 lines
{require( ):566364651986747392}
{=():}

{=(opts):support bot wiki points vcpoints events suggestions}

{=(jargs):{join(~):{args}}}
{=(arg1):{list(0):{jargs}}}
{=(arg2):{list(1):{jargs}}}
{=(arg3):{list(2):{jargs}}}

{=(support):596468976792502274}
{=(bot):596510072633557002}
{=(wiki):596496976217112578}
{=(points):791090367851528206}
{=(vcpoints):791090448898195486}
{=(events):813185958324994048}
{=(suggestions):1086001732632457227}

{=(COMMENT):Day Check}
{=(D.1):{if({in(d):{lower:{arg3}}}==true):{lower:{arg3}}}}
{=(D.2):{lower:{replace(, ):{D.1(2+):d}}}}
{=(Dcheck1):{if(=={D.2}):{D.1}}}
{=(Dfinal):{replace(d,):{if(!={Dcheck1}):{Dcheck1}}}}
{=(Dmath):{if({m:sgn({Dfinal})}==1):{m:trunc({Dfinal}*1440)}}}

{=(COMMENT):Hour Check}
{=(H.1):{if({in(h):{lower:{arg3}}}==true):{lower:{arg3}}}}
{=(H.2):{lower:{replace(, ):{H.1.1(2+):h}}}}
{=(Hcheck1):{if(=={H.2}):{H.1}}}
{=(Hfinal):{replace(h,):{if(!={Hcheck1}):{Hcheck1}}}}
{=(Hmath):{if({m:sgn({Hfinal})}==1):{m:trunc({Hfinal}*60)}}}

{=(COMMENT):Minute Check}
{=(M.1):{if({in(m):{lower:{arg3}}}==true):{lower:{arg3}}}}
{=(M.2):{lower:{replace(, ):{M.1.1(2+):m}}}}
{=(Mcheck1):{if(=={M.2}):{M.1}}}
{=(Mfinal):{replace(m,):{if(!={Mcheck1}):{Mcheck1}}}}
{=(Mmath):{if({m:sgn({Mfinal})}==1):{Mfinal}}}

{=(COMMENT):Checks all user inputs for correct syntax usage as well as the D H M outputs for valid outputs}
{=(D):{all(!={Dmath}|=={Hmath}|=={Mmath}):{Dmath}}}
{=(H):{all(=={Dmath}|!={Hmath}|=={Mmath}):{Hmath}}}
{=(M):{all(=={Dmath}|=={Hmath}|!={Mmath}):{Mmath}}}
{=(NONE):{all(=={Dmath}|=={Hmath}|=={Mmath}):None}}
{=(output):{D}{H}{M}{NONE}}

{=(check):{if({output}!=None):true|false}}

{=(cmd):{if({check}==true):temprole|role add}}

{=(reason):{args(3+)}}
{{if({check}==true):=(reason):{args(4+)}}}

{=(valid):{and({in({arg1}):{opts}}==true|{reason}!=):true|false}}

{=(err):Incorrect format! Please follow this format: `?punish <role> <user> [time] <reason>`.
Roles: `{join(`, `):{opts}}`}

{=(execute):{if({check}==true):c:{cmd} {arg2} {output}m {{arg1}}|c: {cmd} {arg2} {{arg1}}}}

{=(length):{if({check}==true):for {arg3}|Indefinitely}}

{=(userCheck):{all({in(<@):{arg2}}==true|{in(>):{arg2}}==true):{arg2}|{if({m:sgn({arg2})}==1):<@{arg2}>|invalid}}}

{=(success):{userCheck} got the role <@&{{arg1}}> applied by {user(mention)} {length}.
Reason: {reason}}

{{all({valid}==true|{userCheck}!=invalid):{execute}|err}}
{{all({valid}==true|{userCheck}!=invalid):success}}
{{all({valid}==true|{userCheck}!=invalid):redirect:567428769766440962}}
{{all({in(true):{valid}}==true|{userCheck}!=invalid):reactu:✅|reactu:❌}}
{silent}
Raw JSON
{
  "id": 1017831,
  "created_at": "2021-08-19T15:46:40.000Z",
  "tag_name": "punish",
  "nsfw": false,
  "owner_id": "311808747141857292",
  "uses": 225,
  "description": "A punishment tag made for the BDFD server, it's used to apply punishment roles (temproles) to member and log it in the mod logs channel.\nCorrect syntax: ?punish <role> <user> [time] <reason>\nRoles: `support`, `bot`, `wiki`, `points`, `vcpoints`, `events`, `suggestions`",
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "",
  "hidden": false,
  "guild_id": "566363823137882154",
  "sharer": "311808747141857292",
  "content": "{require( ):566364651986747392}\n{=():}\n\n{=(opts):support bot wiki points vcpoints events suggestions}\n\n{=(jargs):{join(~):{args}}}\n{=(arg1):{list(0):{jargs}}}\n{=(arg2):{list(1):{jargs}}}\n{=(arg3):{list(2):{jargs}}}\n\n{=(support):596468976792502274}\n{=(bot):596510072633557002}\n{=(wiki):596496976217112578}\n{=(points):791090367851528206}\n{=(vcpoints):791090448898195486}\n{=(events):813185958324994048}\n{=(suggestions):1086001732632457227}\n\n{=(COMMENT):Day Check}\n{=(D.1):{if({in(d):{lower:{arg3}}}==true):{lower:{arg3}}}}\n{=(D.2):{lower:{replace(, ):{D.1(2+):d}}}}\n{=(Dcheck1):{if(=={D.2}):{D.1}}}\n{=(Dfinal):{replace(d,):{if(!={Dcheck1}):{Dcheck1}}}}\n{=(Dmath):{if({m:sgn({Dfinal})}==1):{m:trunc({Dfinal}*1440)}}}\n\n{=(COMMENT):Hour Check}\n{=(H.1):{if({in(h):{lower:{arg3}}}==true):{lower:{arg3}}}}\n{=(H.2):{lower:{replace(, ):{H.1.1(2+):h}}}}\n{=(Hcheck1):{if(=={H.2}):{H.1}}}\n{=(Hfinal):{replace(h,):{if(!={Hcheck1}):{Hcheck1}}}}\n{=(Hmath):{if({m:sgn({Hfinal})}==1):{m:trunc({Hfinal}*60)}}}\n\n{=(COMMENT):Minute Check}\n{=(M.1):{if({in(m):{lower:{arg3}}}==true):{lower:{arg3}}}}\n{=(M.2):{lower:{replace(, ):{M.1.1(2+):m}}}}\n{=(Mcheck1):{if(=={M.2}):{M.1}}}\n{=(Mfinal):{replace(m,):{if(!={Mcheck1}):{Mcheck1}}}}\n{=(Mmath):{if({m:sgn({Mfinal})}==1):{Mfinal}}}\n\n{=(COMMENT):Checks all user inputs for correct syntax usage as well as the D H M outputs for valid outputs}\n{=(D):{all(!={Dmath}|=={Hmath}|=={Mmath}):{Dmath}}}\n{=(H):{all(=={Dmath}|!={Hmath}|=={Mmath}):{Hmath}}}\n{=(M):{all(=={Dmath}|=={Hmath}|!={Mmath}):{Mmath}}}\n{=(NONE):{all(=={Dmath}|=={Hmath}|=={Mmath}):None}}\n{=(output):{D}{H}{M}{NONE}}\n\n{=(check):{if({output}!=None):true|false}}\n\n{=(cmd):{if({check}==true):temprole|role add}}\n\n{=(reason):{args(3+)}}\n{{if({check}==true):=(reason):{args(4+)}}}\n\n{=(valid):{and({in({arg1}):{opts}}==true|{reason}!=):true|false}}\n\n{=(err):Incorrect format! Please follow this format: `?punish <role> <user> [time] <reason>`.\nRoles: `{join(`, `):{opts}}`}\n\n{=(execute):{if({check}==true):c:{cmd} {arg2} {output}m {{arg1}}|c: {cmd} {arg2} {{arg1}}}}\n\n{=(length):{if({check}==true):for {arg3}|Indefinitely}}\n\n{=(userCheck):{all({in(<@):{arg2}}==true|{in(>):{arg2}}==true):{arg2}|{if({m:sgn({arg2})}==1):<@{arg2}>|invalid}}}\n\n{=(success):{userCheck} got the role <@&{{arg1}}> applied by {user(mention)} {length}.\nReason: {reason}}\n\n{{all({valid}==true|{userCheck}!=invalid):{execute}|err}}\n{{all({valid}==true|{userCheck}!=invalid):success}}\n{{all({valid}==true|{userCheck}!=invalid):redirect:567428769766440962}}\n{{all({in(true):{valid}}==true|{userCheck}!=invalid):reactu:✅|reactu:❌}}\n{silent}",
  "embed": "{}",
  "last_fetched": "2026-10-20T17:24:47.969Z"
}