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

Forum channels still use payloads from early beta #2190

Closed
Lulalaby opened this issue Aug 2, 2023 · 0 comments · Fixed by #2191
Closed

Forum channels still use payloads from early beta #2190

Lulalaby opened this issue Aug 2, 2023 · 0 comments · Fixed by #2191
Assignees
Labels
bug Something isn't working Failing API Reflection priority: high High Priority status: todo This issue needs work

Comments

@Lulalaby
Copy link
Member

Lulalaby commented Aug 2, 2023

Problem

Discord informed us that our payloads for post creations in forum channels are invalid.

Before we could specify the message directly in the root object as content, as well as other fields.

This was changed long ago tho.

References

pycord/discord/http.py

Lines 1186 to 1208 in 0763261

if content:
payload["content"] = content
if applied_tags:
payload["applied_tags"] = applied_tags
if embed:
payload["embeds"] = [embed]
if embeds:
payload["embeds"] = embeds
if nonce:
payload["nonce"] = nonce
if allowed_mentions:
payload["allowed_mentions"] = allowed_mentions
if components:
payload["components"] = components
if stickers:
payload["sticker_ids"] = stickers

Solution

The inner payload for the message has to be a message payload.

{
    "message": {
        // message object properties
    }
}

References

Additional

While looking through blame, it came to our attention that there's another problem with a certain route which had a special param before release to test.
The param needs to be removed.

References

pycord/discord/http.py

Lines 1214 to 1218 in 0763261

route = Route(
"POST",
"/channels/{channel_id}/threads?has_message=true",
channel_id=channel_id,
)

@Lulalaby Lulalaby added bug Something isn't working priority: high High Priority status: todo This issue needs work Failing API Reflection labels Aug 2, 2023
@Lulalaby Lulalaby moved this to Todo in Pycord Releases Aug 2, 2023
@Lulalaby Lulalaby pinned this issue Aug 2, 2023
@Lulalaby Lulalaby moved this from Todo to In Progress in Pycord Releases Aug 2, 2023
@VincentRPS VincentRPS linked a pull request Aug 2, 2023 that will close this issue
9 tasks
@github-project-automation github-project-automation bot moved this from In Progress to Done in Pycord Releases Aug 2, 2023
@Lulalaby Lulalaby unpinned this issue Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Failing API Reflection priority: high High Priority status: todo This issue needs work
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants