Closed ghost closed 2 years ago
OK, found the issue: the webhook has a different payload structure for Discord, so it wasn't working. Ended up implementing a separate reporter for Discord with additional functionality. It should work now; it's available as a release candidate in the unreleased branch.
Would you be so kind to test it? If so, you can install it with
pip install git+https://github.com/mborsetti/webchanges.git@unreleased
The documentation for the new Discord reporter is at https://webchanges.readthedocs.io/en/unreleased/reporters.html#discord (oops, I just noticed that the alphabetical order needs to be restored; will fix).
Thanks!
Thank you for making those changes! There are a few limitations with Pushover - mainly message length being clipped when more than one job is reported.
The instructions need some editing. I took a stab at changing from "webhooks" to "discord" for the reporter name after "webhooks" failed... and it's working.
I believe the reporter also requires a max_message_length: 2000
?
As far as the config.yaml
is concerned, do we need to keep all of the reporters listed even though they are not enabled? At some point when in debug mode I noticed that webchanges considered it malformed and reverted to a default config.yaml if some of the reporters were missing.
2022-04-12 16:51:45,717 storage[4470128064] INFO: The configuration file /Users/john/Library/Preferences/webchanges/config.yaml is missing directive(s); the following default values are being used:
report:
email:
enabled: false
from: ''
html: true
method: smtp
sendmail:
path: sendmail
smtp:
auth: true
host: localhost
insecure_password: ''
port: 25
starttls: true
user: ''
subject: '[webchanges] {count} changes: {jobs}'
to: ''
ifttt:
enabled: false
event: ''
key: ''
mailgun:
api_key: ''
domain: ''
enabled: false
from_mail: ''
from_name: ''
region: us
subject: '[webchanges] {count} changes: {jobs}'
to: ''
matrix:
access_token: ''
enabled: false
homeserver: ''
room_id: ''
prowl:
api_key: ''
application: ''
enabled: false
priority: 0
subject: '[webchanges] {count} changes: {jobs}'
pushbullet:
api_key: ''
enabled: false
telegram:
bot_token: ''
chat_id: ''
enabled: false
silent: false
webhook:
enabled: false
markdown: false
max_message_length: null
webhook_url: ''
xmpp:
enabled: false
insecure_password: ''
recipient: ''
sender: ''
See documentation at https://webchanges.readthedocs.io//en/stable/configuration.html
Anyway to get links and text to show up in Discord as clickable web links? I am guessing no since it's embedded information. I am also not getting colored text in Discord.
Thanks. The documentation was indeed rushed for this release candidate and will get cleaned up (thanks for the additional inputs) before final release.
Correct; you can remove the reporters not in use from config.yaml
; the alert listing missing keys is there in verbose mode to make it easier to understand what's going on for debugging purposes.
I personally am not a Discord user and don't know if/how clickable web links can be made; if you find out how, please share. Similarly the colorization was an upstream contribution and am surprised to read that it isn't working :(
Just adding more info for those interested. The links and color are there when viewed in a browser - just not on the iOS Discord.app... yet.
Markdown is not fully supported from computer to mobile. I'm sorry for any hassle.
I know that we want to reach full parity between PC and Mobile and we have a lot of devs who use the platform so I hope sooner rather than later, but unfortunately I don't have any ETA on it.
Trying to understand why the same job that sends text to pushover is not sending text via the webhook feature and Discord
Did a bit of googling and looking through the docs but must be missing some bit of info. Hoping you have some insight.
My Discord link has been edited.