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

[FEAT] Support creating thread in Forum with webhook #1721

Open
1 task done
retr0-init opened this issue Jul 27, 2024 · 0 comments
Open
1 task done

[FEAT] Support creating thread in Forum with webhook #1721

retr0-init opened this issue Jul 27, 2024 · 0 comments

Comments

@retr0-init
Copy link
Contributor

retr0-init commented Jul 27, 2024

Problem Description

The current API Webhook.send only has the field to input the thread_id. It means that the current API can only send webhook messages in an existing post.
It also applies to the normal thread in a media channel.

Proposed Solution

In official discord API documentation, this feature can be supported with thread_name field in the request.
Therefore, we can add a thread_name parameter in the http.execute_webhook function where the thread_name field will be added to the payload.
Noting that this will be a conflict between the thread_name and thread_id, there should be an exclusive check between those two parameters.
The thread_name parameter can only be valid in the forum and media channel types, so I think the check (i.e. A specific error) of current channel is also necessary
It will also introduce an additional parameter in the Webhook.send method.

Alternatives Considered

N/A

Additional Information

https://discord.com/developers/docs/resources/webhook#execute-webhook

Code of Conduct

  • I agree to follow the contribution requirements.
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

1 participant