mirror of
https://github.com/keanuplayz/TravBot-v3.git
synced 2024-08-15 02:33:12 +00:00
Refactored paginate and added poll to library
This commit is contained in:
parent
c980a182f8
commit
a493536a23
8 changed files with 231 additions and 222 deletions
|
@ -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()`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue