Refactored paginate and added poll to library

This commit is contained in:
WatDuhHekBro 2021-04-11 05:45:50 -05:00
parent c980a182f8
commit a493536a23
8 changed files with 231 additions and 222 deletions

View file

@ -75,9 +75,16 @@ Because versions are assigned to batches of changes rather than single changes (
```ts
const pages = ["one", "two", "three"];
paginate(send, page => {
paginate(send, author.id, pages.length, page => {
return {content: pages[page]};
}, pages.length, author.id);
});
```
`poll()`
```ts
const results = await poll(await send("Do you agree with this decision?"), ["✅", "❌"]);
results["✅"]; // number
results["❌"]; // number
```
`confirm()`