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

Add a "files" arg to Paginator.send/respond for embed thumbnails #692

Closed
code0nwheels opened this issue Jan 3, 2022 · 7 comments · Fixed by #1300
Closed

Add a "files" arg to Paginator.send/respond for embed thumbnails #692

code0nwheels opened this issue Jan 3, 2022 · 7 comments · Fixed by #1300
Assignees
Labels
ext.pages Relating to ext.pages feature request New feature request priority: low Low Priority status: in progress Work in Progess
Milestone

Comments

@code0nwheels
Copy link

Summary

A way to send paginated embeds with local thumbnails

What is the feature request for?

discord.ext.pages

The Problem

I am trying to send a paginated list of embeds with thumbnails I have stored locally but there isn't a "files" arg to send my thumbnails as an attachment.

The Ideal Solution

Add a "files" arg to Paginator.send/respond

The Current Solution

No response

Additional Context

No response

@code0nwheels code0nwheels added the feature request New feature request label Jan 3, 2022
@andrewkenreich
Copy link

@code0nwheels
Copy link
Author

@andrewkenreich
Copy link

andrewkenreich commented Jan 6, 2022

async def send(self, ctx: Union[ApplicationContext, Context], files: List[discord.File], ephemeral: bool = False) -> Union[discord.Message, discord.WebhookMessage]:

if isinstance(ctx, ApplicationContext): msg = await ctx.respond( content=page if isinstance(page, str) else None, embed=page if isinstance(page, discord.Embed) else None, view=self, files=files, ephemeral=ephemeral, ) print(msg) else: msg = await ctx.send( content=page if isinstance(page, str) else None, embed=page if isinstance(page, discord.Embed) else None, files=files, view=self, )

ok here's what I changed in pagination.py

It works...kinda.

if you do

await paginator.send(ctx, files, ephemeral=False) - files being a list of discord file objects.

Problem is hiding the other files that send - see below - it does work to change them on the buttons but they all show up there. Not sure what do from here

image

@code0nwheels
Copy link
Author

Cool thanks!

I wonder if this is even possible now since you have to attach all at once and you can't send a file when you edit a message (or in this case change a page).

@andrewkenreich
Copy link

#712

This will get us closer to the desired outcome once implemented

@code0nwheels
Copy link
Author

Thanks so much!

So can your tweak be also be implemented in respond as well?

@krittick
Copy link
Contributor

krittick commented Apr 3, 2022

Planned to be added to the functionality for the Page object.

@krittick krittick added priority: low Low Priority status: planned Planned in the future labels Apr 3, 2022
@krittick krittick modified the milestones: v2.1, v2.0 Apr 26, 2022
@krittick krittick added status: in progress Work in Progess ext.pages Relating to ext.pages and removed status: planned Planned in the future labels Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext.pages Relating to ext.pages feature request New feature request priority: low Low Priority status: in progress Work in Progess
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants