-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support for multiple webhooks. #22
base: master
Are you sure you want to change the base?
Conversation
maybe rename maybe also legacy support for
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better add the string check and transform it if needed to a list.
That way both WEBHOOKS are valid.
A Single one as String and also a List.
(Also that way it is backwards compatible)
raidnearby.py
Outdated
headers={'Content-Type': 'application/json'} | ||
) | ||
LOG.info('Webhook is send.') | ||
for wh in self.config.WEBHOOK: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conf_webhook = self.config.WEBHOOK
if isinstance(conf_webhook , str):
conf_webhook = [conf_webhook ]
for wh in conf_webhook:
How about something like this in order to add legacy support? @123FLO321
or
|
Adds support for multiple webhook endpoints.
Example use is I use a Discord bot and a PokeAlarm instance.