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

(BC) fix embeds cant have 2 fields with same name #1146

Merged
merged 1 commit into from Jul 1, 2023

Conversation

SQKo
Copy link
Member

@SQKo SQKo commented Jul 1, 2023

Fixes #1142

Breaking changes for people using $embed->fields->offsetGet('name') or $embed->fields['name']

Tested using code from issue

Discord\Parts\Embed\Embed Object
(
    [title] =>
    [type] =>
    [description] =>
    [url] =>
    [timestamp] =>
    [color] => 16777215
    [footer] => Discord\Parts\Embed\Footer Object
        (
            [text] =>
            [icon_url] =>
            [proxy_icon_url] =>
        )

    [image] => Discord\Parts\Embed\Image Object
        (
            [url] =>
            [proxy_url] =>
            [height] =>
            [width] =>
        )

    [thumbnail] => Discord\Parts\Embed\Image Object
        (
            [url] =>
            [proxy_url] =>
            [height] =>
            [width] =>
        )

    [video] => Discord\Parts\Embed\Video Object
        (
            [url] =>
            [proxy_url] =>
            [height] =>
            [width] =>
        )

    [provider] =>
    [author] => Discord\Parts\Embed\Author Object
        (
            [name] =>
            [url] =>
            [icon_url] =>
            [proxy_icon_url] =>
        )

    [fields] => Discord\Helpers\Collection Object
        (
            [0] => Discord\Parts\Embed\Field Object
                (
                    [name] => ​
                    [value] => ​
                    [inline] =>
                )

            [1] => Discord\Parts\Embed\Field Object
                (
                    [name] => ​
                    [value] => ​
                    [inline] =>
                )

        )

)

@SQKo SQKo requested review from CommandString, Exanlv and a team July 1, 2023 04:56
@SQKo SQKo added this to In progress in DiscordPHP via automation Jul 1, 2023
@SQKo SQKo linked an issue Jul 1, 2023 that may be closed by this pull request
DiscordPHP automation moved this from In progress to Reviewer approved Jul 1, 2023
@SQKo SQKo merged commit 9fab769 into master Jul 1, 2023
2 checks passed
DiscordPHP automation moved this from Reviewer approved to Done Jul 1, 2023
@SQKo SQKo deleted the 1142-embeds-cant-have-2-fields-with-the-same-name branch July 1, 2023 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Embeds can't have 2 fields with the same name
2 participants