T
T
TipoImya2020-08-10 18:45:16
JavaScript
TipoImya, 2020-08-10 18:45:16

If a person is on the first page, and clicks on the reaction to go back a page, then nothing happens. How to do?

I have two list pages, let's say members. There are three reactions: the
first is the back arrow (going back to the page) the
second is the forward arrow (going to the page forward) the
third is the cross (closes the embed message)

I need: if the person is on the first page (the first 10 people), then when clicking on the back arrow reaction, then nothing happens with the list.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-08-10
@Alexandre888

make 2 text options for the forward and backward arrows.
after that, build a reaction collector: if a forward reaction is detected message.edit(second_text), otherwise, if a backward reaction is detected,message.edit(first_text)

(first 10 people)
let collected_size = [];

collector.on("collect", m => {
   collected_size.push(1)
   if (collected_size.length > 10) {
       return;
   } else {
     . . .
   }
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question