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

Please add discord thread support for webhooks. #294

Closed
Osamu01 opened this issue Aug 21, 2023 · 14 comments · Fixed by #302
Closed

Please add discord thread support for webhooks. #294

Osamu01 opened this issue Aug 21, 2023 · 14 comments · Fixed by #302
Assignees

Comments

@Osamu01
Copy link

Osamu01 commented Aug 21, 2023

title says it all. would be even better if it could support tags, because then we could post all our webhooks to one channel and have it auto tag itself as 'loot' or what have you, to easily be sorted through.

@Felanbird
Copy link
Member

Discord webhooks already support threads, just put ?thread_id=IDHERE at the end of the webhook
image

@Osamu01
Copy link
Author

Osamu01 commented Aug 21, 2023

Discord webhooks already support threads, just put ?thread_id=IDHERE at the end of the webhook image

Is it possible to have it create a new thread as opposed to comment in one? also can tags be added?

@Felanbird
Copy link
Member

Felanbird commented Aug 21, 2023

Is it possible to have it create a new thread as opposed to comment in one? also can tags be added?

It's not a discord bot so no, it only interacts with what webhooks can interact with. The same answer for adding tags.
edit: It seems we could create threads, but still not tag them.

@Osamu01
Copy link
Author

Osamu01 commented Aug 22, 2023

Is it possible to have it create a new thread as opposed to comment in one? also can tags be added?

It's not a discord bot so no, it only interacts with what webhooks can interact with. The same answer for adding tags. edit: It seems we could create threads, but still not tag them.

Thank you for all of your help, this is awesome. I am having an issue with using ?thread_name=loot though, as it's not creating a thread. Do you have any idea what my issue might be?

@Felanbird
Copy link
Member

Thank you for all of your help, this is awesome. I am having an issue with using ?thread_name=loot though, as it's not creating a thread. Do you have any idea what my issue might be?

For thread_name it's something we would have to add internally, it's not done by adding it to the webhook like thread_id was

@Osamu01
Copy link
Author

Osamu01 commented Aug 22, 2023

Thank you for all of your help, this is awesome. I am having an issue with using ?thread_name=loot though, as it's not creating a thread. Do you have any idea what my issue might be?

For thread_name it's something we would have to add internally, it's not done by adding it to the webhook like thread_id was

I see. Is this an update I could look forward to? Perhaps a toggle on whether or not I'd like to create a thread when posting.

@iProdigy
Copy link
Member

Note: thread_name is only supported for "forum" discord channels - webhooks cannot create threads in normal text channels

If your use case is for forum channels, yes I can look into adding support

@Osamu01
Copy link
Author

Osamu01 commented Aug 22, 2023

Note: thread_name is only supported for "forum" discord channels - webhooks cannot create threads in normal text channels

If your use case is for forum channels, yes I can look into adding support

yes I would love that. right now I have created threads for it to post under, but I originally wanted to create forum threads per post. This would be more ideal given discords behavior of hiding inactive posts, afaik indefinitely.

@iProdigy iProdigy self-assigned this Aug 22, 2023
@iProdigy
Copy link
Member

I originally wanted to create forum threads per post

Could you clarify why you want a new thread per notification? You alluded to a sorting benefit, but I'm not quite following (given that automatic tagging is not possible from our end)

 

more ideal given discords behavior of hiding inactive posts

You could set the inactivity period to 7 days, so threads only hide if no notification has occurred in a week. If a thread does get hidden for inactivity, a new notification should unhide the thread for everyone subscribed.

@Osamu01
Copy link
Author

Osamu01 commented Aug 25, 2023

I originally wanted to create forum threads per post

Could you clarify why you want a new thread per notification? You alluded to a sorting benefit, but I'm not quite following (given that automatic tagging is not possible from our end)

 

more ideal given discords behavior of hiding inactive posts

You could set the inactivity period to 7 days, so threads only hide if no notification has occurred in a week. If a thread does get hidden for inactivity, a new notification should unhide the thread for everyone subscribed.

If I'm able to set a custom title per notif type(post) then it's nice considering I personally could make my own bot to assign tags. I don't really mind how I have it right now so it's not as if it needs to be changed, but it just seems more intuitive.

@iProdigy
Copy link
Member

iProdigy commented Aug 25, 2023

and so I'm on the same page - what's the benefit of that approach over creating a separate (single) thread per notif type (and specifying each thread as a webhook override)?

@iProdigy
Copy link
Member

For the custom title per notification type, do you need a separate box per notifier or would a single box with template replacements work? For example: %TYPE% could be loot, death, etc. so you could have a template like: %TYPE% for %USERNAME% at %TIMESTAMP%

@Osamu01
Copy link
Author

Osamu01 commented Aug 25, 2023

For the custom title per notification type, do you need a separate box per notifier or would a single box with template replacements work? For example: %TYPE% could be loot, death, etc. so you could have a template like: %TYPE% for %USERNAME% at %TIMESTAMP%

the %type% thing works, and again the benefit is mostly being able to view it a different way. it would also be nice if you could add a template that references each field so like %TYPECOPY% which just copies the notification message of the relevant type.

@iProdigy
Copy link
Member

Forum tags via webhook was documented in discord/discord-api-docs#6560, so we are implementing that part of your request now!

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

Successfully merging a pull request may close this issue.

3 participants