IanMitchell / sentrydiscord.dev

Forward Sentry notifications to your Discord server
https://sentrydiscord.dev
MIT License
209 stars 22 forks source link

Add basic support for threads #28

Closed GeniusTimo closed 1 year ago

GeniusTimo commented 2 years ago

Hey there 👋

This pull request is quite incomplete, but I wanted to leave this as a suggestion to provide support for sending webhook messages within threads. Perhaps my solution is as simple as suggested but I have not tested this yet - in addition, it lacks any documentation.

Hopefully I'm not the only one looking for a thread-only webhook ✌

vercel[bot] commented 2 years ago

@GeniusTimo is attempting to deploy a commit to the Sentry Discord Team on Vercel.

A member of the Team first needs to authorize it.

IanMitchell commented 2 years ago

Oh interesting. I actually don't know how threads and webhooks work within Discord - is it a webhook on a channel with just the thread_id param passed in?

GeniusTimo commented 2 years ago

Yes! https://discord.dev/resources/webhook#execute-webhook

IanMitchell commented 2 years ago

Sweet! I will try to take a look at this sometime this week, but I might be a little too busy to get to it - I'm heading out on an international trip for a week, so this might sit until the second week of September, sorry :(

GeniusTimo commented 2 years ago

No problem, have a nice vacation ✈

connorjclark commented 1 year ago

Any chance this could be merged? From my experience with the Discord API, the PR looks good to me.

I can play around with extending the functionality later - it'd be useful to create a new thread based on the Sentry issue and add subsequent messages to the same thread. With this current PR everything would just be in a single thread. It'll take some querying of the Discord channel but it should be doable.

IanMitchell commented 1 year ago

Yeah! Lemme do a little bit of testing on it and I will get it in sometime this week. Probably gonna need to get to the other side of July 4th first, but after that I'll try and get it out quickly. Sorry, I guess I lost track of this PR - thank you for the reminder bump

IanMitchell commented 1 year ago

Merged into Main, should be deployed soon!

GeniusTimo commented 1 year ago

Thank you!