Skip to content

Commit

Permalink
Merge pull request #38 from DAzVise/master
Browse files Browse the repository at this point in the history
allow hooks that still use discordapp as a domain
  • Loading branch information
kyb3r authored Jul 28, 2020
2 parents fd71b8b + c3cc16b commit f19de41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dhooks/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ class Webhook:
The id of the channel the webhook sends messages to.
""" # noqa: W605
URL_REGEX = r'^(?:https?://)?((canary|ptb)\.)?discord\.com/api/webhooks/' \
r'(?P<id>[0-9]+)/(?P<token>[A-Za-z0-9\.\-\_]+)/?$'
URL_REGEX = r'^(?:https?://)?((canary|ptb)\.)?discord(?:app)?\.com/api/' \
r'webhooks/(?P<id>[0-9]+)/(?P<token>[A-Za-z0-9\.\-\_]+)/?$'
ENDPOINT = 'https://discord.com/api/webhooks/{id}/{token}'
CDN = r'https://cdn.discordapp.com/avatars/' \
r'{0.id}/{0.default_avatar}.{1}?size={2}'
Expand Down

0 comments on commit f19de41

Please sign in to comment.