From 8b27e3c1212875e724ae8479a665c7bee31a9087 Mon Sep 17 00:00:00 2001 From: Mhynlo Date: Fri, 17 Feb 2017 00:09:24 -0800 Subject: [PATCH] discord notification tts support with spelling fix --- couchpotato/core/notifications/discord.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/notifications/discord.py b/couchpotato/core/notifications/discord.py index ae3497d..829ff26 100644 --- a/couchpotato/core/notifications/discord.py +++ b/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',