You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 29, 2021. It is now read-only.
The library currently won't automatically paginate (I guess the menu name can be a bit misleading), so you have to manually define pages. There is an auto PaginatedMenu in the works, however.
My recommendation would be to pre-build your pages in a loop. You could use a generator if you are concerned about memory, but I can't see that being a big issue unless you're making hundreds of thousands of pages.
Choose how many items you want displayed per page, then do something like this:
# this will let us build a list of sized chunks that we can then use to build our pages
def split_data(data, chunk_size):
for i in range(0, len(data), chunk_size):
yield data[i : i + chunk_size]
# we'll pass in our account list and break it into 10 accounts per page
account_info = list(split_data(account_list, 10))
# now we have a list of lists, so we can iterate over that to build our pages
# you can turn use list comprehension for more performance here as well, but for readability sake we'll do it the naive way
pages = []
for item in account_info:
pages.append(Page(title='Title', description=item))
After that, just pass the list of pages into the .add_pages method and you're good to go.
This isn't tested code, but it should give you an idea on how to go about dynamically chunking your data and then turning it into a bunch of pages.
AccountInfo` = f"**Total Accounts:**
{TotalAccounts}\n{AccountList}\n**All Account Summary:**\n **Total Money:** ${yess}\n **Withdrawn:** ${outmoney}\n **Unclaimed:** ${noo}" try: if len(AccountInfo) > 2048: embed=discord.Embed(title=None,description=AccountInfo[:1905],color=0x9999ff) embed.set_author(name=f"{ctx.author.name}'s Profile", icon_url=ctx.author.avatar_url) embed2=discord.Embed(title=None,description=AccountInfo[1905:],color=0x9999ff) embed2.set_author(name=f"{ctx.author.name}'s Profile", icon_url=ctx.author.avatar_url
I want to Paginate Even if it exceed my character limit i am using now is 3000 but when character exceed bot dont send message
:(
The text was updated successfully, but these errors were encountered: