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

Discord threads #191

Merged
merged 9 commits into from Mar 9, 2023
Merged

Conversation

CodyCline
Copy link
Contributor

#190

Essentially, I copied how message threads were implemented in the slack provider but for the discord one. This pr also fixes a minor bug where the optional discord_avatar_url and discord_username were not being passed into the shoutrrr library as url params.

cyicz123 and others added 5 commits November 3, 2022 23:42
change example `notify -version` to `notify -verbose`. It's a small typo.
…es to specific chat threads. Implement optional threads setting for discord provider.
@ehsandeep ehsandeep changed the base branch from master to dev November 19, 2022 09:40
@ehsandeep ehsandeep linked an issue Nov 19, 2022 that may be closed by this pull request
@Mzack9999 Mzack9999 self-requested a review December 14, 2022 21:32
@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Dec 14, 2022
@sonarcloud
Copy link

sonarcloud bot commented Dec 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Mar 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @CodyCline, apologies for the delayed response on this; curious how discord_thread_id can be obtained. Is the user supposed to do this manually?

@CodyCline
Copy link
Contributor Author

@ehsandeep No worries on delayed response. As for the optional discord_thread_id parameter, if the user wants notify to push messages to a specific discord thread, the id can be captured one of these ways:

  • Programmatically create a new discord thread, and get its id from response. Next you would inject that id into the provider-config.yaml file using a bash script or some other method.
  • Programmatically list discord threads from a channel, filter by a property and reference its' id.
  • Turn on developer mode within the discord app, you can right click a thread and the option to copy its id is available.

References:

  1. https://discordjs.guide/popular-topics/threads.html#thread-related-gateway-events
  2. https://discordnet.dev/api/Discord.WebSocket.SocketTextChannel.html
  3. https://discord.com/developers/docs/game-sdk/store#:~:text=Open%20up%20the%20Discord%20app,and%20enter%20your%20application%20ID

@ehsandeep
Copy link
Member

Thank you for sharing this information @CodyCline.

@ehsandeep ehsandeep merged commit e0dcf6f into projectdiscovery:dev Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement support for discord threads.
4 participants