Skip to content

DiscordResponse with Embed and ActionRow is invalid #69

@NotOats

Description

@NotOats

Building a DiscordResponse with only an Embed and ActionRow is throwing a validation error saying it needs an embed or content field.

DiscordResponse(embeds=[embed], action_row=action_row)

This bit of validation seems to be the issue:

        if self._action_row:
            if self.content == None or self.embeds == [] or self.content == "":
                raise InvalidDiscordResponse(
                    "If creating a response with an action row, content or an embed must be present!"
                )

It should probably be:

if (self.content == None or self.content == "") and self.embeds == []:

A work around I've found seems to be setting content = " " in the DiscordResponse

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions