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

DeferredResponse ignores ActionRow and Empherical #49

Open
EthanC opened this issue Aug 2, 2021 · 5 comments
Open

DeferredResponse ignores ActionRow and Empherical #49

EthanC opened this issue Aug 2, 2021 · 5 comments

Comments

@EthanC
Copy link

EthanC commented Aug 2, 2021

When attempting to send a DeferredResponse, certain components of the new_message DiscordResponse are ignored. In my experience, both action_row and empherical do not function.

Example:

@interactions.on("example")
async def ExampleCommand(ctx: IncomingDiscordInteraction) -> DeferredResponse:
    """Example command demonstrating DeferredResponse ignoring action_row and empherical."""

    await bot.send_deferred_message(
        original_context=ctx,
        new_message=DiscordResponse(
            content="This part works",
            action_row=ActionRow(
                components=[
                    LinkButton(
                        label="This does not work",
                        url="https://github.com/ms7m/dispike",
                    )
                ]
            ),
            empherical=True
        ),
    )
@ms7m
Copy link
Owner

ms7m commented Aug 2, 2021

Same issue with me, but it looks like this a problem on Discord's side. discord/discord-api-docs#2735.. (At least for Empherical).. It might also be the reason why ActionRows don't work..

I'll try to poke around the docs and ask for support if this is the case.

@ms7m
Copy link
Owner

ms7m commented Aug 2, 2021

Took a deeper look at it, it seems that if the original message (DeferredResponse) is not empherical, it cannot be changed to empherical later on (as well as action rows). I think I'll work on a method to let the the user know this is the case.

@EthanC
Copy link
Author

EthanC commented Aug 7, 2021

Would it be possible to work around this API limitation for action_rows in a DeferredResponse, similar to how you've done with DeferredEmphericalResponse? Perhaps something like DeferredComponentResponse?

@ms7m
Copy link
Owner

ms7m commented Aug 7, 2021

That sounds good, i'll add that.

@EthanC
Copy link
Author

EthanC commented Aug 9, 2021

@ms7m The API forces a less than ideal implementation for this, but to cover all bases, maybe a DeferredEmphericalComponentResponse should be implemented as well? It's not an attractive name for the class, but from the looks of discussion in the Discord Developers Server, this is an intended behavior that should be supported.

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

2 participants