Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 Buttons not working #20

Open
justanothernoob4648 opened this issue Sep 28, 2020 · 5 comments
Open

2 Buttons not working #20

justanothernoob4648 opened this issue Sep 28, 2020 · 5 comments

Comments

@justanothernoob4648
Copy link

Originally, I had all 5 of the default buttons working. Now, only 3 of the work. The buttons that show the first and last page of the menu have started showing up. They aren't being added as a reaction. I haven't changed anything.

@uKaigo
Copy link

uKaigo commented Sep 28, 2020

Can you provide reproduction steps? Or logs.

@helish88
Copy link

and send ur code

@redgoldlace
Copy link

While you say that you haven't changed anything, has the data that you're paginating changed? Assuming you're using MenuPages, reactions will not be added in certain situations, i.e if there is only one page - based on the description provided, it sounds like that's what's going on here, and it is intended behaviour.

As a note, this issue seems very ambiguous, and potentially like it is not an issue with ext.menus - it will be easier for issues like this to be resolved in the future if you provide more details. For general help with the library and ext.menus, consider joining discord.py's discord server here.

@SirThane
Copy link

How many pages are in your source? I noticed in my testing that the function of the skip_if kwarg in the button decorator tells the Menu when to not apply a button. The default buttons on MenuPages are set to skip First and Last buttons if there are only two pages.

If I only had two pages, my only buttons were Previous, Next, and Stop.
If I had more than two, all five buttons were added.
If there was only one page, it still sent the message, but it was not treated as a menu, no controls are added (e.g. timeout), and no buttons were applied.

@justanothernoob4648
Copy link
Author

How many pages are in your source? I noticed in my testing that the function of the skip_if kwarg in the button decorator tells the Menu when to not apply a button. The default buttons on MenuPages are set to skip First and Last buttons if there are only two pages.

If I only had two pages, my only buttons were Previous, Next, and Stop.
If I had more than two, all five buttons were added.
If there was only one page, it still sent the message, but it was not treated as a menu, no controls are added (e.g. timeout), and no buttons were applied.

Your right that is what happened, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants