Browse Source

discord notification tts support

with spelling fix
pull/7178/head
Mhynlo 8 years ago
parent
commit
8b27e3c121
  1. 9
      couchpotato/core/notifications/discord.py

9
couchpotato/core/notifications/discord.py

@ -26,7 +26,7 @@ class Discord(Notification):
headers = {b"Content-Type": b"application/json"}
try:
r = requests.post(self.conf('webhook_url'), data=json.dumps(dict(content=message, username=self.conf('bot_name'), avatar_url=self.conf('avatar_url'))), headers=headers)
r = requests.post(self.conf('webhook_url'), data=json.dumps(dict(content=message, username=self.conf('bot_name'), avatar_url=self.conf('avatar_url'), tts=self.conf('discord_tts'))), headers=headers)
r.status_code
except Exception as e:
log.warning('Error Sending Discord response error code: {0}'.format(r.status_code))
@ -74,6 +74,13 @@ config = [{
'advanced': True,
},
{
'name': 'discord_tts',
'default': 0,
'type': 'bool',
'advanced': True,
'description': 'Send notification using text-to-speech.',
},
{
'name': 'on_snatch',
'default': 0,
'type': 'bool',

Loading…
Cancel
Save