projectdiscovery / notify

Notify is a Go-based assistance package that enables you to stream the output of several tools (or read from a file) and publish it to a variety of supported platforms.

Home Page:https://projectdiscovery.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discord integration sends empty messages

ahmedgomaaa opened this issue · comments

Notify version:
1.0.6

Current Behavior:
when trying to set notify to send messages over discord, it sends empty messages with not content.
this is not problem with the discord webhook as it works just fine if POST request is sent, the messages are sent as normal, but for some reason, notify sends empty message

Expected Behavior:
should send correct messages

Steps To Reproduce:

steps to reproduce the behavior:

  1. Set provider-config.yaml to the the webhook
discord:
  - id: "subs"
    discord_channel: "bbh"
    discord_username: "Spidey Bott"
    discord_format: "{{data}}"
    discord_webhook_url: "https://discord.com/api/webhooks/*************(REDACTED_WEBHOOK_URL)"
  1. run notify, for example, echo 'hi' | notify -pc ./provider-config.yaml
  2. See that messages are being sent empty

Screenshots:

image

Couldn't repro the issue with the same config:

image
discord:
  - id: "subs"
    discord_channel: "#general"
    discord_username: "dogancanbakir-bot"
    discord_format: "{{data}}"
    discord_webhook_url: "https://discord.com/api/webhooks/XXX/YYY"

using your exact same config, I still get the empty message

image

strange behavior, not sure where the issue is, but it seems to be on my end, since it its working with you fine...

Can you retry with the main branch instead?

go install -v github.com/projectdiscovery/notify/cmd/notify@main

Still the same issue, I even tried in a different virutal linux system, using the main branch.
But still sends an empty message

image

It seems to be an account-related issue.

Nonetheless, there should be some type of warning or error message. I haven't looked deeply into the tool, but isn't there a -debug flag that prints more information?

IMG-20240603-WA0015.jpg

😉

Nonetheless, there should be some type of warning or error message. I haven't looked deeply into the tool, but isn't there a -debug flag that prints more information?

You can use verbose flag to print more info.

IMG-20240603-WA0015.jpg

😉

That Fixes the issue, Thank you friend! have a nice day