Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [type]
- interactionCreate
- [code]
- $if[$checkContains[$customID;1first;1last;1page]==true;
- $arrayLoad[customID;-;$customID]
- $let[nextlocation;$arrayAt[customID;1]]
- $let[current;$arrayAt[customID;2]]
- $let[pages;$arrayAt[customID;3]]
- $let[dataperpage;$arrayAt[customID;4]]
- $let[separator;$arrayAt[customID;5]]
- $let[data;$getVar[1data;$authorID;]]
- $arrayLoad[data;$get[separator];$get[data]]
- $if[$and[$arrayAt[customID;6]!=;$arrayAt[customID;6]!=$authorID]==true;
- $ephemeral
- $description[This isn't for you]
- $color[#2c2d31]
- $stop ]
- $let[sum;$math[($get[dataperpage]*$get[nextlocation])-$get[dataperpage]]]
- $if[$checkContains[$divide[$arrayLength[data];$get[dataperpage]];.]==true;
- $arrayLoad[pages;.;$divide[$arrayLength[data];$get[dataperpage]]]
- $let[pages;$sum[$arrayAt[pages;0];1]]
- ;
- $let[pages;$divide[$arrayLength[data];$get[dataperpage]]]]
- $interactionUpdate[
- $description[
- $trimStart[$trimEnd[
- $if[$get[dataperpage]>=1;
- $arrayAt[data;$sum[$get[sum];0]]]
- $if[$get[dataperpage]>=2;
- $arrayAt[data;$sum[$get[sum];1]]]
- $if[$get[dataperpage]>=3;
- $arrayAt[data;$sum[$get[sum];2]]]
- $if[$get[dataperpage]>=4;
- $arrayAt[data;$sum[$get[sum];3]]]
- $if[$get[dataperpage]>=5;
- $arrayAt[data;$sum[$get[sum];4]]]
- $if[$get[dataperpage]>=6;
- $arrayAt[data;$sum[$get[sum];5]]]
- $if[$get[dataperpage]>=7;
- $arrayAt[data;$sum[$get[sum];6]]]
- $if[$get[dataperpage]>=8;
- $arrayAt[data;$sum[$get[sum];7]]]
- $if[$get[dataperpage]>=9;
- $arrayAt[data;$sum[$get[sum];8]]]
- $if[$get[dataperpage]>=10;
- $arrayAt[data;$sum[$get[sum];9]]]
- ]]
- ]
- $footer[Page $get[nextlocation] of $get[pages]]
- $color[#2c2d31]
- $deleteActionRow[1]
- $addActionRow
- $if[$get[nextlocation]==1;
- $let[ldisabled;true];
- $let[ldisabled;false]]
- $addButton[1first-1-$get[nextlocation]-$get[pages]-$get[dataperpage]-$get[separator]-$authorID; ;Secondary;⏪;$get[ldisabled]]
- $addButton[1page-$sub[$get[nextlocation];1]-$get[nextlocation]-$get[pages]-$get[dataperpage]-$get[separator]-$authorID; ;Secondary;⬅️;$get[ldisabled]]
- $if[$get[nextlocation]==$get[pages];
- $let[rdisabled;true];
- $let[rdisabled;false]]
- $addButton[1page-$sum[$get[nextlocation];1]-$get[nextlocation]-$get[pages]-$get[dataperpage]-$get[separator]-$authorID; ;Secondary;➡️;$get[rdisabled]]
- $addButton[1last-$get[pages]-$get[nextlocation]-$get[pages]-$get[dataperpage]-$get[separator]-$authorID; ;Secondary;⏩;$get[rdisabled]]
- ]
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement