Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Trigger: $onInteraction
- $nomention
- $textSplit[$customID;-]
- $if[$splitText[1]==warnLogs]
- $if[$splitText[2]==$authorID]
- $var[color;4ac1e4]
- $var[excla;❕]
- $if[$or[$checkUserPerms[$authorID;moderatemembers]==true;$isAdmin[$authorID]==true]==false]
- $ephemeral
- $removeAllComponents
- $var[excla] You do not have required permissions to run this command!
- $else
- $var[get-user;$splitText[3]]
- $jsonParse[$getUserVar[userWarns.json;$var[get-user]]]
- $if[$or[$json[infractions]==[\];$jsonExists[infractions]==false]==true]
- $ephemeral
- $removeAllComponents
- $description[$var[excla] <@$splitText[3]> has no warnings]
- $color[$var[color]]
- $else
- $var[infractions.length;$jsonArrayCount[infractions]]
- $async[OwO]
- $textSplit[$replaceText[$getEmbedData[$channelID;$messageID;1;footer];Page;];/]
- $var[fetched.current.page;$splitText[1]]
- $enableDecimals[true]
- $var[div;$divide[$var[infractions.length];4]]
- $if[$checkContains[$var[div];.]==true]
- $textSplit[$var[div];.]
- $var[total.pages;$sum[$splitText[1];1]]
- $else
- $var[total.pages;$var[div]]
- $endif
- $endasync $await[OwO]
- $if[$splitText[4]==firstpage]
- $var[updated.page;1]
- $elseif[$splitText[4]==prevpage]
- $var[updated.page;$sub[$var[fetched.current.page];1]]
- $elseif[$splitText[4]==nextpage]
- $var[updated.page;$sum[$var[fetched.current.page];1]]
- $elseif[$splitText[4]==lastpage]
- $var[updated.page;$var[total.pages]]
- $endif
- $if[$or[$var[updated.page]>$var[total.pages];$var[updated.page]<=0]==true]
- $var[updated.page;$var[total.pages]]
- $endif
- $var[newline.space;$url[decode;%0A+]]
- $var[newline;$url[decode;%0A]]
- $var[n;$sub[$multi[$var[updated.page];4];3]]
- $var[q;$sub[$var[n];1]]
- $var[time.emoji;`⏰`]
- $var[id.emoji;`🆔`]
- $var[reason.emoji;`📜`]
- $var[loop;%{DOL}%if[%{DOL}%json[infractions\;%{DOL}%var[q\]\]!=\]%{DOL}%var[n\]. **Moderator:** <@%{DOL}%json[infractions\;%{DOL}%var[q\]\;moderator\;id\]> `(%{DOL}%json[infractions\;%{DOL}%var[q\]\;moderator\;name\])`%{DOL}%var[newline.space\]- %{DOL}%var[reason.emoji\] Reason: %{DOL}%async[%{DOL}%var[q\]\]%{DOL}%jsonParse[{ "text": "%{DOL}%json[infractions\;%{DOL}%var[q\]\;reason\]" }\]%{DOL}%var[r.text\;%{DOL}%json[text\]\]%{DOL}%endasync%{DOL}%await[%{DOL}%var[q\]\]%{DOL}%var[r.text\]%{DOL}%var[newline.space\]- %{DOL}%var[time.emoji\] Time: <t:%{DOL}%json[infractions\;%{DOL}%var[q\]\;timestamp\]> (<t:%{DOL}%json[infractions\;%{DOL}%var[q\]\;timestamp\]:R>)%{DOL}%var[newline.space\]- %{DOL}%var[id.emoji\] WarnID: %{DOL}%json[infractions\;%{DOL}%var[q\]\;warnID\]%{DOL}%var[newline\]%{DOL}%var[n\;%{DOL}%calculate[%{DOL}%var[n\]+1\]\]%{DOL}%endif%{DOL}%var[q\;%{DOL}%calculate[%{DOL}%var[q\]+1\]\]]
- $var[warnings;$eval[$repeatMessage[4;$var[loop]]]]
- $title[*This user has $var[infractions.length] Warnings*]
- $description[$var[warnings]$var[newline]$var[newline]Total Warnings Issued: $json[total-warns]]
- $thumbnail[$userServerAvatar[$var[get-user]]]
- $footer[Page $var[updated.page]/$var[total.pages]]
- $color[$var[color]]
- $var[first-arrow;<:Pixelated_FirstArrow:1193452503589716078>]
- $var[prev-arrow;<:Pixelated_PrevArrow:1193452525832126464>]
- $var[next-arrow;<:Pixelated_NextArrow:1193452428230672435>]
- $var[last-arrow;<:Pixelated_LastArrow:1193452401831710720>]
- $var[cross-button;<:VN_RedCross:1068802990657519686>]
- $var[arrow.buttons.color;secondary]
- $removeAllComponents
- $addButton[false;warnLogs-$authorID-$var[get-user]-firstpage;;$var[arrow.buttons.color];$checkCondition[$var[updated.page]==1];$var[first-arrow]]
- $addButton[false;warnLogs-$authorID-$var[get-user]-prevpage;;$var[arrow.buttons.color];$checkCondition[$var[updated.page]==1];$var[prev-arrow]]
- $addButton[false;warnLogs-$authorID-$var[get-user]-nextpage;;$var[arrow.buttons.color];$checkCondition[$var[updated.page]>=$var[total.pages]];$var[next-arrow]]
- $addButton[false;warnLogs-$authorID-$var[get-user]-lastpage;;$var[arrow.buttons.color];$checkCondition[$var[updated.page]>=$var[total.pages]];$var[last-arrow]]
- $addButton[false;vani-$authorID;;danger;no;$var[cross-button]]
- $var[x;$sub[$multi[$var[updated.page];4];3]]
- $var[p;$sub[$var[x];1]]
- $var[warn.ids.style.button;secondary]
- $eval[$repeatMessage[4;%{DOL}%if[%{DOL}%json[infractions\;%{DOL}%var[p\]\]!=\]%{DOL}%addButton[%{DOL}%checkCondition[$var[p]==%{DOL}%var[p\]\]\;user.warn.id-%{DOL}%authorID-%{DOL}%json[infractions\;%{DOL}%var[p\]\;warnID\]\;%{DOL}%var[x\]\;%{DOL}%var[warn.ids.style.button\]\;false\;🆔\]%{DOL}%var[x\;%{DOL}%calculate[%{DOL}%var[x\]+1\]\]%{DOL}%endif%{DOL}%var[p\;%{DOL}%calculate[%{DOL}%var[p\]+1\]\]]]
- $addButton[true;deleteWarn-$authorID-All-$var[get-user];Clear all warnings;primary;false]
- $addButton[false;deleteWarn-$authorID-Specific-$var[get-user];Clear a specific warning;primary;false]
- $endif $c[ <- Infractions empty check ]
- $endif $c[ <- User's moderateMembers/Admin Perms check end ]
- $else
- $ephemeral
- $removeAllComponents
- not your button
- $endif
- $endif
- $if[$splitText[1]==deleteWarn]
- $if[$splitText[2]==$authorID]
- $var[excla;❕]
- $if[$or[$checkUserPerms[$authorID;moderatemembers]==true;$isAdmin[$authorID]==true]==false]
- $ephemeral
- $removeAllComponents
- $var[excla] You do not have required permissions to run this command!
- $else
- $jsonParse[$getUserVar[userWarns.json;$splitText[4]]]
- $if[$or[$jsonExists[infractions]==false;$json[infractions]==[\]]==true]
- $ephemeral
- $removeAllComponents
- That user has no warnings!
- $else
- $if[$splitText[3]==All]
- $ephemeral
- $removeAllComponents
- $var[color;4ac1e4]
- $title[Confirmation!]
- $description[Are you sure you want to clear all warnings for <@$splitText[4]> ?]
- $color[$var[color]]
- $addButton[no;all.warnings.clear-true-$messageID-$splitText[4];Yes;danger;false]
- $addButton[no;all.warnings.clear-false-$messageID-$splitText[4];No;success;false]
- $elseif[$splitText[3]==Specific]
- $newModal[deleteWarn-$authorID-openModal-$splitText[4];Clear a warn]
- $addTextInput[warn~id;short;Enter a valid warn ID;7;40;true]
- $elseif[$splitText[3]==openModal]
- $ephemeral
- $removeAllComponents
- $var[warn_id;$input[warn~id]]
- $var[color;4ac1e4]
- $var[x;0]
- $var[loop;%{DOL}%if[%{DOL}%json[infractions\;%{DOL}%var[x\]\;warnID\]==%{DOL}%var[warn_id\]\]%{DOL}%var[found_warn_id\;%{DOL}%json[infractions\;%{DOL}%var[x\]\]\]%{DOL}%stop%{DOL}%endif%{DOL}%var[x\;%{DOL}%calculate[%{DOL}%var[x\]+1\]\]]
- $var[repeat;$replaceText[$cropText[$repeatMessage[10;$repeatMessage[10;z]];$jsonArrayCount[infractions];];z;$var[loop]]]
- $var[result;$eval[$var[repeat]]]
- $var[time.emoji;`⏰`]
- $var[id.emoji;`🆔`]
- $var[reason.emoji;`📜`]
- $if[$var[found_warn_id]==]
- Warn ID `$var[warn_id]` not found for <@$splitText[4]> ($username[$splitText[4]])
- $else
- $title[Are you sure you want to remove this warn?]
- $description[- **Moderator**: <@$json[infractions;$var[x];moderator;id]> ($json[infractions;$var[x];moderator;name])$url[decode;%0A+]- $var[reason.emoji] Reason:$async[]$jsonParse[{ "text": "$json[infractions;$var[x];reason]" }]$var[r.text;$json[text]]$endasync $await[]$var[r.text]$url[decode;%0A+]- $var[time.emoji] Time: <t:$json[infractions;$var[x];timestamp]> (<t:$json[infractions;$var[x];timestamp]:R>)$url[decode;%0A+]- $var[id.emoji] WarnID: $json[infractions;$var[x];warnID]]
- $color[$var[color]]
- $addButton[no;specify.warning.clear-true-$var[x]-$splitText[4]-$messageID;Yes;danger;false]
- $addButton[no;specify.warning.clear-false-$var[x]-$splitText[4]-$messageID;No;success;false]
- $endif
- $endif $c[ Delete-warn 3rd split end ]
- $endif $c[ <- infractions key check ]
- $endif $c[ <- User Moderate/Admin Perm check ]
- $else
- $ephemeral
- $removeAllComponents
- not your button
- $endif
- $endif
- $if[$splitText[1]==all.warnings.clear]
- $var[color;4ac1e4]
- $var[tick;☑️]
- $if[$splitText[2]==true]
- $jsonParse[$getUserVar[userWarns.json;$splitText[4]]]
- $if[$or[$jsonExists[infractions]==false;$json[infractions]==[\]]==true]
- $title[~~Confirmation!~~]
- $description[~~Are you sure you want to clear all warnings for <@$splitText[4]> ?~~]
- $color[$var[color]]
- $description[That user has no warnings!;2]
- $color[$var[color];2]
- $else
- $jsonUnset[infractions]
- $setUserVar[userWarns.json;$jsonStringify;$splitText[4]]
- $removeAllComponents[$splitText[3]]
- $editMessage[$channelID;$splitText[3];;;$var[tick] Cleared all warnings for <@$splitText[4]>;$var[color];]
- $title[~~Confirmation!~~]
- $description[~~Are you sure you want to clear all warnings for <@$splitText[4]> ?~~]
- $color[$var[color]]
- $endif
- $else
- $title[~~Confirmation!~~]
- $description[~~Are you sure you want to clear all warnings for <@$splitText[4]> ?~~]
- $color[$var[color]]
- $description[Action cancelled;2]
- $color[$var[color];2]
- $endif
- $editButton[all.warnings.clear-true-$splitText[3]-$splitText[4];Yes;danger;true]
- $editButton[all.warnings.clear-false-$splitText[3]-$splitText[4];No;success;true]
- $endif
- $if[$splitText[1]==specify.warning.clear]
- $var[color;4ac1e4]
- $var[tick;☑️]
- $var[time.emoji;`⏰`]
- $var[id.emoji;`🆔`]
- $var[reason.emoji;`📜`]
- $var[mainMenu.msgID;$splitText[5]]
- $var[array.index;$splitText[3]]
- $jsonParse[$getUserVar[userWarns.json;$splitText[4]]]
- $if[$or[$jsonExists[infractions]==false;$json[infractions]==[\]]==true]
- $description[<@$splitText[4]> has no warnings!]
- $color[$var[color]]
- $else
- $if[$splitText[2]==true]
- $title[~~Are you sure you want to remove this warn?~~]
- $description[~~- **Moderator**: <@$json[infractions;$var[array.index];moderator;id]> ($json[infractions;$var[array.index];moderator;name])$url[decode;%0A+]- $var[reason.emoji] Reason:$async[]$jsonParse[{ "text": "$json[infractions;$var[array.index];reason]" }]$var[r.text;$json[text]]$endasync $await[]$var[r.text]$url[decode;%0A+]- $var[time.emoji] Time: <t:$json[infractions;$var[array.index];timestamp]> (<t:$json[infractions;$var[array.index];timestamp]:R>)$url[decode;%0A+]- $var[id.emoji] WarnID: $json[infractions;$var[array.index];warnID]~~]
- $color[$var[color]]
- $var[removed.warn.id;$json[infractions;$var[array.index];warnID]]
- $jsonUnset[infractions;$var[array.index]]
- $setUserVar[userWarns.json;$jsonStringify;$splitText[4]]
- $description[$var[tick] Successfully deleted this warning from <@$splitText[4]>;2]
- $color[$var[color];2]
- $editButton[user.warn.id-$authorID-$var[removed.warn.id];$sum[$var[array.index];1];secondary;true;🆔;$var[mainMenu.msgID]]
- $else
- $title[~~Are you sure you want to remove this warn?~~]
- $description[~~- **Moderator**: <@$json[infractions;$var[array.index];moderator;id]> ($json[infractions;$var[array.index];moderator;name])$url[decode;%0A+]- $var[reason.emoji] Reason:$async[]$jsonParse[{ "text": "$json[infractions;$var[array.index];reason]" }]$var[r.text;$json[text]]$endasync $await[]$var[r.text]$url[decode;%0A+]- $var[time.emoji] Time: <t:$json[infractions;$var[array.index];timestamp]> (<t:$json[infractions;$var[array.index];timestamp]:R>)$url[decode;%0A+]- $var[id.emoji] WarnID: $json[infractions;$var[array.index];warnID]~~]
- $color[$var[color]]
- $description[Action Cancelled;2]
- $color[$var[color];2]
- $endif
- $endif
- $editButton[specify.warning.clear-true-$splitText[3]-$splitText[4]-$splitText[5];Yes;danger;true]
- $editButton[specify.warning.clear-false-$splitText[3]-$splitText[4]-$splitText[5];No;success;true]
- $endif
- $if[$splitText[1]==user.warn.id]
- $if[$splitText[2]==$authorID]
- $ephemeral
- $removeAllComponents
- $var[color;4ac1e4]
- $description[$splitText[3]]
- $color[$var[color]]
- $else
- $ephemeral
- $removeAllComponents
- not your button
- $endif
- $endif
Advertisement
Advertisement