Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Trigger: $onInteraction
- $nomention
- $botListHide
- $textSplit[$customID;-]
- $var[prev-arrow.emoji;<:Meow_PreviousPage:1179715759069470741>]
- $var[next-arrow.emoji;<:Meow_NextPage:1179715792292560977>]
- $var[last-arrow.emoji;<:Meow_LastPage:1179715820763500605>]
- $var[first-arrow.emoji;<:Meow_FirstPage:1179715724013477898>]
- $var[note.emoji;📝]
- $var[loading.emoji;🔄]
- $var[color;84e7e2]
- $if[$splitText[1]==GuildRolesListModal]
- $if[$splitText[2]==$authorID]
- $if[$splitText[3]==CustomPageModal]
- $newModal[GuildRolesList-$authorID-CustomPageInput;Server Roles list]
- $addTextInput[specific.page.num;short;Page Number;1;2;true;;2]
- $endif
- $else
- $ephemeral
- $removeAllComponents
- This is not your button!
- $endif
- $endif
- $if[$splitText[1]==GuildRolesList]
- $if[$splitText[2]==$authorID]
- $var[chan-id;$channelID]
- $var[msg-id;$messageID]
- $async[fetch_current_page]
- $textSplit[$replaceText[$getEmbedData[$var[chan-id];$var[msg-id];1;footer];Page;];/]
- $var[current.page;$splitText[1]]
- $var[footer.data;$getEmbedData[$var[chan-id];$var[msg-id];1;footer]]
- $var[title.data;$getEmbedData[$var[chan-id];$var[msg-id];1;title]]
- $endasync $await[fetch_current_page]
- $async[total_pages_math]
- $var[guild.roles.count;$sub[$roleCount;1]]
- $enableDecimals[true]
- $var[div;$divide[$var[guild.roles.count];10]]
- $if[$checkContains[$var[div];.]==true]
- $textSplit[$var[div];.]
- $var[total.pages;$sum[1;$splitText[1]]]
- $else
- $var[total.pages;$var[div]]
- $endif
- $endasync $await[total_pages_math]
- $if[$splitText[3]==FirstPage]
- $var[updated.page;1]
- $elseif[$splitText[3]==PrevPage]
- $var[updated.page;$sub[$var[current.page];1]]
- $elseif[$splitText[3]==NextPage]
- $var[updated.page;$sum[$var[current.page];1]]
- $elseif[$splitText[3]==LastPage]
- $var[updated.page;$var[total.pages]]
- $elseif[$splitText[3]==CustomPageInput]
- $var[input;$input[specific.page.num]]
- $if[$isNumber[$var[input]]==false]
- $var[updated.page;1]
- $else
- $var[updated.page;$round[$var[input]]]
- $endif
- $endif
- $if[$or[$var[updated.page]<=0;$var[updated.page]>$var[total.pages]]==true]
- $var[updated.page;$var[total.pages]]
- $endif
- $async[disable_buttons]
- $removeAllComponents[$var[msg-id]]
- $addButton[no;first-page;;primary;true;$var[first-arrow.emoji];$var[msg-id]]
- $addButton[no;prev-page;;primary;true;$var[prev-arrow.emoji];$var[msg-id]]
- $addButton[no;custom-page;;secondary;true;$var[note.emoji];$var[msg-id]]
- $addButton[no;next-page;;primary;true;$var[next-arrow.emoji];$var[msg-id]]
- $addButton[no;last-page;;primary;true;$var[last-arrow.emoji];$var[msg-id]]
- $endasync
- $if[$splitText[3]==FirstPage]
- $editMessage[$var[chan-id];$var[msg-id];;$var[title.data];Loading First Page $var[loading.emoji];$var[color];$var[footer.data]]
- $elseif[$splitText[3]==PrevPage]
- $editMessage[$var[chan-id];$var[msg-id];;$var[title.data];Loading Previous Page $var[loading.emoji];$var[color];$var[footer.data]]
- $elseif[$splitText[3]==NextPage]
- $editMessage[$var[chan-id];$var[msg-id];;$var[title.data];Loading Next Page $var[loading.emoji];$var[color];$var[footer.data]]
- $elseif[$splitText[3]==LastPage]
- $editMessage[$var[chan-id];$var[msg-id];;$var[title.data];Loading Last Page $var[loading.emoji];$var[color];$var[footer.data]]
- $else
- $editMessage[$var[chan-id];$var[msg-id];;$var[title.data];Loading `$var[updated.page]` Page $var[loading.emoji];$var[color];$var[footer.data]]
- $endif
- $defer
- $var[key;$getVar[ApiKey]]
- $var[token;$getVar[BotToken]]
- $httpAddHeader[guild-id;$guildID]
- $httpAddHeader[apikey;$var[key]]
- $httpAddHeader[bot-token;$var[token]]
- $httpGet[https://bdfddata.rickyjs.xyz/release/guild/roles]
- $jsonParse[$httpResult]
- $async[]
- $httpGet[https://bdfddata.rickyjs.xyz/release/guild/members]
- $var[mems;$httpResult]
- $endasync $await[]
- $var[h;$sub[$multi[$var[updated.page];10];9]]
- $var[sep;$url[decode;%0A]]
- $var[title;Server Roles ($var[guild.roles.count])]
- $var[description;$eval[$repeatMessage[10;%{DOL}%if[%{DOL}%json[details\;%{DOL}%var[h\]\;id\]!=\]%{DOL}%var[h\]. <@&%{DOL}%json[details\;%{DOL}%var[h\]\;id\]> - %{DOL}%textSplit[%{DOL}%var[mems\]\;%{DOL}%json[details\;%{DOL}%var[h\]\;id\]\]%{DOL}%var[r.%{DOL}%var[h\]\;%{DOL}%sub[%{DOL}%getTextSplitLength\;1\]\] **%{DOL}%var[r.%{DOL}%var[h\]\] %{DOL}%if[%{DOL}%var[r.%{DOL}%var[h\]\]==1\]Member%{DOL}%elseMembers%{DOL}%endif**%{DOL}%var[sep\]%{DOL}%else %{DOL}%stop%{DOL}%endif%{DOL}%var[h\;%{DOL}%sum[1\;%{DOL}%var[h\]\]\]]]]
- $var[color;$var[color]]
- $var[footer;Page $var[updated.page]/$var[total.pages]]
- $async[results]
- $editMessage[$var[chan-id];$var[msg-id];;$var[title];$var[description];$var[color];$var[footer]]
- $removeAllComponents[$var[msg-id]]
- $addButton[no;GuildRolesList-$authorID-FirstPage;;primary;$checkCondition[$var[updated.page]==1];$var[first-arrow.emoji];$var[msg-id]]
- $addButton[no;GuildRolesList-$authorID-PrevPage;;primary;$checkCondition[$var[updated.page]==1];$var[prev-arrow.emoji];$var[msg-id]]
- $addButton[no;GuildRolesListModal-$authorID-CustomPageModal;;secondary;no;$var[note.emoji];$var[msg-id]]
- $addButton[no;GuildRolesList-$authorID-NextPage;;primary;$checkCondition[$var[updated.page]==$var[total.pages]];$var[next-arrow.emoji];$var[msg-id]]
- $addButton[no;GuildRolesList-$authorID-LastPage;;primary;$checkCondition[$var[updated.page]==$var[total.pages]];$var[last-arrow.emoji];$var[msg-id]]
- $endasync
- $else
- $ephemeral
- $removeAllComponents
- This is not your button!
- $endif
- $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement