-
Notifications
You must be signed in to change notification settings - Fork 154
Description
It appears that discord.go expects DiscordWebHookURL to use "discord.com" as the domain for webhook URLs: https://github.com/projectdiscovery/notify/blob/master/pkg/providers/discord/discord.go#L43
Copying a webhook's URL from Discord's settings currently yields an URL with "discordapp.com." Pasting webhook URLs copied from Discord into provider-config.yaml results in the following error when running notify:
[ERR] failed to send discord notification for id: alert : token missing from config URL
Changing "discordapp.com" in the webhook's URL to the expected "discord.com" results in a valid configuration.
I am not sure if, at one point in time, Discord used "discord.com" instead of "discordapp.com" for webhook URLs or if this was a typo.
Trimming both "https://discord.com/api/webhooks/" and "https://discordapp.com/api/webhooks/" from the discordTokens variable seems like an easy solution that would not break existing configurations and also allow pasting webhook URLs copied directly from Discord.