Util.Pad.prev() - shysolocup/noscord.js GitHub Wiki

goes to the previous page, if it goes past page 1 it repeats back to the last page
type: Function

arguments:

  • by Number: defaults to 1

let pad = new util.Pad(2, [ 
    "a", "b", // page 1
    "c", "d", // page 2
]);


pad.current; // [ "a", "b" ]


pad.prev();
pad.current; // [ "c", "d" ]


pad.prev();
pad.current; // [ "a", "b" ]


⚠️ **GitHub.com Fallback** ⚠️