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

Menus wont load unless I explicitly ask for the page first #16

Open
TurnrDev opened this issue Aug 18, 2020 · 3 comments · May be fixed by #37
Open

Menus wont load unless I explicitly ask for the page first #16

TurnrDev opened this issue Aug 18, 2020 · 3 comments · May be fixed by #37
Labels
bug Something isn't working

Comments

@TurnrDev
Copy link

This is my code:

        embeds = LeaderboardPages(leaderboard, per_page=10, base=emb, emoji=self.emoji, stat=stat)

        menu = menus.MenuPages(
            source=embeds, timeout=300.0, message=message, clear_reactions_after=True,
        )
        await menu.show_page(0)
        await menu.start(ctx)

I followed the code example in README.md for AsyncIteratorPageSource and it says to simply call the Menu Pages object and the await menu.start(ctx) but any time I did that I had an empty response. Seems I needed to call await menu.show_page(0) first

@TurnrDev
Copy link
Author

After thurther investgation, the issue only seems to happen when message has been declared on the init for MenuPages.

@Rapptz Rapptz added the bug Something isn't working label Aug 18, 2020
@Rapptz
Copy link
Owner

Rapptz commented Aug 18, 2020

Unfortunately this one is a bit rough to fix. Per the implementation as it stands, send_initial_message isn't called if a message is already supplied. For Menu that works okay but for MenuPages that means that it's never called and thus the page isn't shown.

TurnrDev pushed a commit to TurnrDev/discord-ext-menus that referenced this issue Aug 19, 2020
@TurnrDev
Copy link
Author

I've added a note in README about this exact issue (PR #17) - It's not a bug fix but it's better than nothing :)

@ToxicKidz ToxicKidz linked a pull request Mar 31, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants