From df7ada04b854478e32876c5681f747a6e4e12cd9 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sun, 20 Sep 2020 09:50:07 +0100 Subject: [PATCH] Change `Discordapp` to `Discord` in line with company change. Change remove `app` from URL when calling webhook. Change remind user when testing Notifications config / Discord to update URL. --- CHANGES.md | 3 + gui/slick/images/notifiers/discord.png | Bin 0 -> 1260 bytes gui/slick/images/notifiers/discordapp.png | Bin 1260 -> 0 bytes .../interfaces/default/config_notifications.tmpl | 60 ++++++++++---------- gui/slick/js/configNotifications.js | 28 +++++----- sickbeard/__init__.py | 62 ++++++++++----------- sickbeard/notifiers/__init__.py | 4 +- sickbeard/notifiers/discord.py | 57 +++++++++++++++++++ sickbeard/notifiers/discordapp.py | 47 ---------------- sickbeard/webserve.py | 30 +++++----- 10 files changed, 152 insertions(+), 139 deletions(-) create mode 100644 gui/slick/images/notifiers/discord.png delete mode 100644 gui/slick/images/notifiers/discordapp.png create mode 100644 sickbeard/notifiers/discord.py delete mode 100644 sickbeard/notifiers/discordapp.py diff --git a/CHANGES.md b/CHANGES.md index 39c1705..69ae60b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,8 @@ ### 0.23.0 (2019-xx-xx xx:xx:xx UTC) +* Change `Discordapp` to `Discord` in line with company change +* Change remove `app` from URL when calling webhook +* Change remind user when testing Notifications config / Discord to update URL * Update attr 20.1.0.dev0 (4bd6827) to 20.2.0 (4f74fba) * Update Beautiful Soup 4.8.2 (r559) to 4.9.1 (r585) * Update dateutil 2.8.1 (43b7838) to 2.8.1 (c496b4f) diff --git a/gui/slick/images/notifiers/discord.png b/gui/slick/images/notifiers/discord.png new file mode 100644 index 0000000000000000000000000000000000000000..cdd63bea1551ac7029cc97f305f5b194d91d00a2 GIT binary patch literal 1260 zcmV3x^p zK5q#H+7ccuCKMB5tPP#$R zFc`u}6eJ~WEiJS_OUs4Z`#NVY2j|`cM5@FAdv^BO>;KpO*J~>gVZOEXwNE?Z)lG?9 zCizt?zJyS;8h}jd7OCVo`Rv`#bD7yQhYx%-Fdv3`6hT{i=kBFVFK@4{U(e&L8&}VA z_0r*kr%(2G|0h9L&#t43SG?2_2*nX`AB#XKi(F=wvB6^lNBVYl&P&kq?l*gC8#Zh+ zZjS%6v=v}-*@GeQ-fUPzpeB9PJjp-=1hBNXF_X-b&kMc#hKNOMieVl32 zf$nDw5B-mq+9;)1x-i7e=^WbfLaVjat7Gx{bw$IxE4z!01t1aey)zGFUs3-p z&sXCZ?{)yuc>Ov%6ixUCEe)+}%L<;U0+B)$z*T`+M9{t$;%8CwvKWC9g;IiuA{?zj zhawe)>p*GL#omE*5#85YEB4;)ZRP|7oIYK&68z~)0#~a z@tUUYK#68}EX}6YN<<(Qv2YyW>mMcH z5w!l7{;$DtgmB0r6w(+0%MLO=cw(S9-F)*SeLFiRM}FF?t-$??^=o3jNv8a^pp^0l z&Vy6!$&Sn?GV~vQwtUthV%{&STDd+HttJ$y@(O5ficIPj$?3uKpgul);KO;JEq?>U WUp6=waq}Gj00003x^p zK5q#H+7ccuCKMB5tPP#$R zFc`u}6eJ~WEiJS_OUs4Z`#NVY2j|`cM5@FAdv^BO>;KpO*J~>gVZOEXwNE?Z)lG?9 zCizt?zJyS;8h}jd7OCVo`Rv`#bD7yQhYx%-Fdv3`6hT{i=kBFVFK@4{U(e&L8&}VA z_0r*kr%(2G|0h9L&#t43SG?2_2*nX`AB#XKi(F=wvB6^lNBVYl&P&kq?l*gC8#Zh+ zZjS%6v=v}-*@GeQ-fUPzpeB9PJjp-=1hBNXF_X-b&kMc#hKNOMieVl32 zf$nDw5B-mq+9;)1x-i7e=^WbfLaVjat7Gx{bw$IxE4z!01t1aey)zGFUs3-p z&sXCZ?{)yuc>Ov%6ixUCEe)+}%L<;U0+B)$z*T`+M9{t$;%8CwvKWC9g;IiuA{?zj zhawe)>p*GL#omE*5#85YEB4;)ZRP|7oIYK&68z~)0#~a z@tUUYK#68}EX}6YN<<(Qv2YyW>mMcH z5w!l7{;$DtgmB0r6w(+0%MLO=cw(S9-F)*SeLFiRM}FF?t-$??^=o3jNv8a^pp^0l z&Vy6!$&Sn?GV~vQwtUthV%{&STDd+HttJ$y@(O5ficIPj$?3uKpgul);KO;JEq?>U WUp6=waq}Gj0000
Bubble links:
- + @@ -1710,106 +1710,106 @@
- -

Discordapp

+ +

Discord

Voice and text chat.

-
-
+
-
-
-
-
-
+
-
-
-
-
-
Click below to test
- +
Click below to test
+ -
+
-
+
diff --git a/gui/slick/js/configNotifications.js b/gui/slick/js/configNotifications.js index 3fb8f19..2e3a190 100644 --- a/gui/slick/js/configNotifications.js +++ b/gui/slick/js/configNotifications.js @@ -465,26 +465,26 @@ $(document).ready(function(){ } }); - $('#test-discordapp').click(function () { - var discordappAsAuthed = $('#discordapp-as-authed').prop('checked'), - discordappUsername = $('#discordapp-username').val(), discordappIconUrl = $('#discordapp-icon-url').val(), - discordappAsTts = $('#discordapp-as-tts').prop('checked'), - accessToken = '#discordapp-access-token', discordappAccessToken = $(accessToken).val(); + $('#test-discord').click(function () { + var discordAsAuthed = $('#discord-as-authed').prop('checked'), + discordUsername = $('#discord-username').val(), discordIconUrl = $('#discord-icon-url').val(), + discordAsTts = $('#discord-as-tts').prop('checked'), + accessToken = '#discord-access-token', discordAccessToken = $(accessToken).val(); $(accessToken).removeClass('warning'); - if (!discordappAccessToken) { - $('#test-discordapp-result').html('Please fill out the necessary fields above.'); - if (!discordappAccessToken) + if (!discordAccessToken) { + $('#test-discord-result').html('Please fill out the necessary fields above.'); + if (!discordAccessToken) $(accessToken).addClass('warning'); } else { $(this).prop('disabled', !0); - $('#test-discordapp-result').html(loading); - $.get(sbRoot + '/home/test-discordapp', - {as_authed: discordappAsAuthed, username: discordappUsername, icon_url: discordappIconUrl, - as_tts: discordappAsTts, access_token: discordappAccessToken}) + $('#test-discord-result').html(loading); + $.get(sbRoot + '/home/test-discord', + {as_authed: discordAsAuthed, username: discordUsername, icon_url: discordIconUrl, + as_tts: discordAsTts, access_token: discordAccessToken}) .done(function (data) { - $('#test-discordapp-result').html(data); - $('#test-discordapp').prop('disabled', !1); + $('#test-discord-result').html(data); + $('#test-discord').prop('disabled', !1); }); } }); diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index aea8814..4ab2813 100755 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -449,15 +449,15 @@ SLACK_BOT_NAME = None SLACK_ICON_URL = None SLACK_ACCESS_TOKEN = None -USE_DISCORDAPP = False -DISCORDAPP_NOTIFY_ONSNATCH = False -DISCORDAPP_NOTIFY_ONDOWNLOAD = False -DISCORDAPP_NOTIFY_ONSUBTITLEDOWNLOAD = False -DISCORDAPP_AS_AUTHED = False -DISCORDAPP_USERNAME = None -DISCORDAPP_ICON_URL = None -DISCORDAPP_AS_TTS = 0 -DISCORDAPP_ACCESS_TOKEN = None +USE_DISCORD = False +DISCORD_NOTIFY_ONSNATCH = False +DISCORD_NOTIFY_ONDOWNLOAD = False +DISCORD_NOTIFY_ONSUBTITLEDOWNLOAD = False +DISCORD_AS_AUTHED = False +DISCORD_USERNAME = None +DISCORD_ICON_URL = None +DISCORD_AS_TTS = 0 +DISCORD_ACCESS_TOKEN = None USE_GITTER = False GITTER_NOTIFY_ONSNATCH = False @@ -731,9 +731,9 @@ def init_stage_1(console_logging): MC_MRU, TVC_MRU, \ USE_SLACK, SLACK_NOTIFY_ONSNATCH, SLACK_NOTIFY_ONDOWNLOAD, SLACK_NOTIFY_ONSUBTITLEDOWNLOAD, \ SLACK_CHANNEL, SLACK_AS_AUTHED, SLACK_BOT_NAME, SLACK_ICON_URL, SLACK_ACCESS_TOKEN, \ - USE_DISCORDAPP, DISCORDAPP_NOTIFY_ONSNATCH, DISCORDAPP_NOTIFY_ONDOWNLOAD, \ - DISCORDAPP_NOTIFY_ONSUBTITLEDOWNLOAD, \ - DISCORDAPP_AS_AUTHED, DISCORDAPP_USERNAME, DISCORDAPP_ICON_URL, DISCORDAPP_AS_TTS, DISCORDAPP_ACCESS_TOKEN,\ + USE_DISCORD, DISCORD_NOTIFY_ONSNATCH, DISCORD_NOTIFY_ONDOWNLOAD, \ + DISCORD_NOTIFY_ONSUBTITLEDOWNLOAD, \ + DISCORD_AS_AUTHED, DISCORD_USERNAME, DISCORD_ICON_URL, DISCORD_AS_TTS, DISCORD_ACCESS_TOKEN,\ USE_GITTER, GITTER_NOTIFY_ONSNATCH, GITTER_NOTIFY_ONDOWNLOAD, GITTER_NOTIFY_ONSUBTITLEDOWNLOAD,\ GITTER_ROOM, GITTER_ACCESS_TOKEN, \ USE_TELEGRAM, TELEGRAM_NOTIFY_ONSNATCH, TELEGRAM_NOTIFY_ONDOWNLOAD, TELEGRAM_NOTIFY_ONSUBTITLEDOWNLOAD, \ @@ -744,7 +744,7 @@ def init_stage_1(console_logging): global ANIME_TREAT_AS_HDTV, USE_ANIDB, ANIDB_USERNAME, ANIDB_PASSWORD, ANIDB_USE_MYLIST for stanza in ('General', 'Blackhole', 'SABnzbd', 'NZBGet', 'Emby', 'Kodi', 'XBMC', 'PLEX', - 'Growl', 'Prowl', 'Slack', 'Discordapp', 'Boxcar2', 'NMJ', 'NMJv2', + 'Growl', 'Prowl', 'Slack', 'Discord', 'Boxcar2', 'NMJ', 'NMJv2', 'Synology', 'SynologyNotifier', 'pyTivo', 'Pushalot', 'Pushbullet', 'Subtitles'): check_section(CFG, stanza) @@ -1179,16 +1179,16 @@ def init_stage_1(console_logging): SLACK_ICON_URL = check_setting_str(CFG, 'Slack', 'slack_icon_url', '') SLACK_ACCESS_TOKEN = check_setting_str(CFG, 'Slack', 'slack_access_token', '') - USE_DISCORDAPP = bool(check_setting_int(CFG, 'Discordapp', 'use_discordapp', 0)) - DISCORDAPP_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'Discordapp', 'discordapp_notify_onsnatch', 0)) - DISCORDAPP_NOTIFY_ONDOWNLOAD = bool(check_setting_int(CFG, 'Discordapp', 'discordapp_notify_ondownload', 0)) - DISCORDAPP_NOTIFY_ONSUBTITLEDOWNLOAD = bool( - check_setting_int(CFG, 'Discordapp', 'discordapp_notify_onsubtitledownload', 0)) - DISCORDAPP_AS_AUTHED = bool(check_setting_int(CFG, 'Discordapp', 'discordapp_as_authed', 0)) - DISCORDAPP_USERNAME = check_setting_str(CFG, 'Discordapp', 'discordapp_username', '') - DISCORDAPP_ICON_URL = check_setting_str(CFG, 'Discordapp', 'discordapp_icon_url', '') - DISCORDAPP_AS_TTS = bool(check_setting_str(CFG, 'Discordapp', 'discordapp_as_tts', 0)) - DISCORDAPP_ACCESS_TOKEN = check_setting_str(CFG, 'Discordapp', 'discordapp_access_token', '') + USE_DISCORD = bool(check_setting_int(CFG, 'Discord', 'use_discord', 0)) + DISCORD_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'Discord', 'discord_notify_onsnatch', 0)) + DISCORD_NOTIFY_ONDOWNLOAD = bool(check_setting_int(CFG, 'Discord', 'discord_notify_ondownload', 0)) + DISCORD_NOTIFY_ONSUBTITLEDOWNLOAD = bool( + check_setting_int(CFG, 'Discord', 'discord_notify_onsubtitledownload', 0)) + DISCORD_AS_AUTHED = bool(check_setting_int(CFG, 'Discord', 'discord_as_authed', 0)) + DISCORD_USERNAME = check_setting_str(CFG, 'Discord', 'discord_username', '') + DISCORD_ICON_URL = check_setting_str(CFG, 'Discord', 'discord_icon_url', '') + DISCORD_AS_TTS = bool(check_setting_str(CFG, 'Discord', 'discord_as_tts', 0)) + DISCORD_ACCESS_TOKEN = check_setting_str(CFG, 'Discord', 'discord_access_token', '') USE_GITTER = bool(check_setting_int(CFG, 'Gitter', 'use_gitter', 0)) GITTER_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'Gitter', 'gitter_notify_onsnatch', 0)) @@ -2100,13 +2100,13 @@ def save_config(): ('icon_url', SLACK_ICON_URL), ('access_token', SLACK_ACCESS_TOKEN), ]), - ('Discordapp', [ - ('use_%s', int(USE_DISCORDAPP)), - ('as_authed', int(DISCORDAPP_AS_AUTHED)), - ('username', DISCORDAPP_USERNAME), - ('icon_url', DISCORDAPP_ICON_URL), - ('as_tts', int(DISCORDAPP_AS_TTS)), - ('access_token', DISCORDAPP_ACCESS_TOKEN), + ('Discord', [ + ('use_%s', int(USE_DISCORD)), + ('as_authed', int(DISCORD_AS_AUTHED)), + ('username', DISCORD_USERNAME), + ('icon_url', DISCORD_ICON_URL), + ('as_tts', int(DISCORD_AS_TTS)), + ('access_token', DISCORD_ACCESS_TOKEN), ]), ('Gitter', [ ('use_%s', int(USE_GITTER)), @@ -2160,7 +2160,7 @@ def save_config(): # ('Pushalot', PUSHALOT_NOTIFY_ONSNATCH, PUSHALOT_NOTIFY_ONDOWNLOAD, PUSHALOT_NOTIFY_ONSUBTITLEDOWNLOAD), ('Slack', SLACK_NOTIFY_ONSNATCH, SLACK_NOTIFY_ONDOWNLOAD, SLACK_NOTIFY_ONSUBTITLEDOWNLOAD), - ('Discordapp', DISCORDAPP_NOTIFY_ONSNATCH, DISCORDAPP_NOTIFY_ONDOWNLOAD, DISCORDAPP_NOTIFY_ONSUBTITLEDOWNLOAD), + ('Discord', DISCORD_NOTIFY_ONSNATCH, DISCORD_NOTIFY_ONDOWNLOAD, DISCORD_NOTIFY_ONSUBTITLEDOWNLOAD), ('Gitter', GITTER_NOTIFY_ONSNATCH, GITTER_NOTIFY_ONDOWNLOAD, GITTER_NOTIFY_ONSUBTITLEDOWNLOAD), ('Telegram', TELEGRAM_NOTIFY_ONSNATCH, TELEGRAM_NOTIFY_ONDOWNLOAD, TELEGRAM_NOTIFY_ONSUBTITLEDOWNLOAD), ('Email', EMAIL_NOTIFY_ONSNATCH, EMAIL_NOTIFY_ONDOWNLOAD, EMAIL_NOTIFY_ONSUBTITLEDOWNLOAD), diff --git a/sickbeard/notifiers/__init__.py b/sickbeard/notifiers/__init__.py index f3e52ca..8f5f729 100644 --- a/sickbeard/notifiers/__init__.py +++ b/sickbeard/notifiers/__init__.py @@ -23,7 +23,7 @@ import re # from lib import libtrakt from . import emby, kodi, plex, xbmc, \ boxcar2, nmj, nmjv2, pushbullet, pushover, pytivo, synoindex, synologynotifier, \ - discordapp, emailnotify, gitter, libnotify, growl, prowl, slack, telegram, trakt + discord, emailnotify, gitter, libnotify, growl, prowl, slack, telegram, trakt import sickbeard # noinspection PyPep8Naming @@ -59,7 +59,7 @@ class NotifierFactory(object): # social TRAKT=trakt.TraktNotifier, SLACK=slack.SlackNotifier, - DISCORDAPP=discordapp.DiscordappNotifier, + DISCORD=discord.DiscordNotifier, GITTER=gitter.GitterNotifier, TELEGRAM=telegram.TelegramNotifier, EMAIL=emailnotify.EmailNotifier, diff --git a/sickbeard/notifiers/discord.py b/sickbeard/notifiers/discord.py new file mode 100644 index 0000000..c964cfe --- /dev/null +++ b/sickbeard/notifiers/discord.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# +# This file is part of SickGear. +# +# Thanks to: mallen86, generica +# +# SickGear is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SickGear is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SickGear. If not, see . + +import re +from .generic import Notifier +import sickbeard + + +class DiscordNotifier(Notifier): + + def __init__(self): + super(DiscordNotifier, self).__init__() + + def _notify(self, title, body, as_authed=None, username='', icon_url='', as_tts='', access_token='', **kwargs): + params = [] if not bool(self._choose(not as_authed, sickbeard.DISCORD_AS_AUTHED)) else \ + [('username', self._choose(username, sickbeard.DISCORD_USERNAME) or 'SickGear'), + ('avatar_url', self._choose(icon_url, sickbeard.DISCORD_ICON_URL) or self._sg_logo_url)] + as_tts = self._choose(as_tts, bool(sickbeard.DISCORD_AS_TTS)) + + url = self._choose(access_token, sickbeard.DISCORD_ACCESS_TOKEN) + success_and_deprecated_msg = '' + if 'discordapp' in url: + # upgrade webhook url for get_url, and notify user on test to update setting + url = re.sub(r'^(https?://discord)app', r'\1', url) + success_and_deprecated_msg = '

Note2: Please change `discordapp.com` ' \ + 'in Discord channel webhook to `discord.com`' + + resp = sickbeard.helpers.get_url( + url=url, + post_json=dict([('content', self._body_only(title, body)), ('tts', as_tts)] + params)) + + result = '' == resp or self._choose('bad webhook?', None) + if True is not result: + self._log_error('%s failed to send message: %s' % (self.name, result)) + + return self._choose(('Success, notification sent. (Note: %s displays the icon once in a sequence)%s' + % (self.name, success_and_deprecated_msg), + 'Failed to send notification, %s' % result)[True is not result], result) + + +notifier = DiscordNotifier diff --git a/sickbeard/notifiers/discordapp.py b/sickbeard/notifiers/discordapp.py deleted file mode 100644 index adec795..0000000 --- a/sickbeard/notifiers/discordapp.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -# This file is part of SickGear. -# -# Thanks to: mallen86, generica -# -# SickGear is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SickGear is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SickGear. If not, see . - -from .generic import Notifier -import sickbeard - - -class DiscordappNotifier(Notifier): - - def __init__(self): - super(DiscordappNotifier, self).__init__() - - def _notify(self, title, body, as_authed=None, username='', icon_url='', as_tts='', access_token='', **kwargs): - params = [] if not bool(self._choose(not as_authed, sickbeard.DISCORDAPP_AS_AUTHED)) else \ - [('username', self._choose(username, sickbeard.DISCORDAPP_USERNAME) or 'SickGear'), - ('avatar_url', self._choose(icon_url, sickbeard.DISCORDAPP_ICON_URL) or self._sg_logo_url)] - as_tts = self._choose(as_tts, bool(sickbeard.DISCORDAPP_AS_TTS)) - - resp = sickbeard.helpers.get_url( - url=self._choose(access_token, sickbeard.DISCORDAPP_ACCESS_TOKEN), - post_json=dict([('content', self._body_only(title, body)), ('tts', as_tts)] + params)) - - result = '' == resp or self._choose('bad webhook?', None) - if True is not result: - self._log_error('%s failed to send message: %s' % (self.name, result)) - - return self._choose(('Success, notification sent. (Note: %s clients display icon once in a sequence)' - % self.name, 'Failed to send notification, %s' % result)[True is not result], result) - - -notifier = DiscordappNotifier diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index cf3ae71..26f4ecd 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -1774,10 +1774,10 @@ class Home(MainHandler): channel=channel, as_authed='true' == as_authed, bot_name=bot_name, icon_url=icon_url, access_token=access_token) - def test_discordapp(self, as_authed=False, username=None, icon_url=None, as_tts=False, access_token=None): + def test_discord(self, as_authed=False, username=None, icon_url=None, as_tts=False, access_token=None): self.set_header('Cache-Control', 'max-age=0,no-cache,no-store') - return notifiers.NotifierFactory().get('DISCORDAPP').test_notify( + return notifiers.NotifierFactory().get('DISCORD').test_notify( as_authed='true' == as_authed, username=username, icon_url=icon_url, as_tts='true' == as_tts, access_token=access_token) @@ -7820,10 +7820,10 @@ class ConfigNotifications(Config): use_slack=None, slack_notify_onsnatch=None, slack_notify_ondownload=None, slack_notify_onsubtitledownload=None, slack_access_token=None, slack_channel=None, slack_as_authed=None, slack_bot_name=None, slack_icon_url=None, - use_discordapp=None, discordapp_notify_onsnatch=None, discordapp_notify_ondownload=None, - discordapp_notify_onsubtitledownload=None, discordapp_access_token=None, - discordapp_as_authed=None, discordapp_username=None, discordapp_icon_url=None, - discordapp_as_tts=None, + use_discord=None, discord_notify_onsnatch=None, discord_notify_ondownload=None, + discord_notify_onsubtitledownload=None, discord_access_token=None, + discord_as_authed=None, discord_username=None, discord_icon_url=None, + discord_as_tts=None, use_gitter=None, gitter_notify_onsnatch=None, gitter_notify_ondownload=None, gitter_notify_onsubtitledownload=None, gitter_access_token=None, gitter_room=None, use_telegram=None, telegram_notify_onsnatch=None, telegram_notify_ondownload=None, @@ -7967,15 +7967,15 @@ class ConfigNotifications(Config): sickbeard.SLACK_BOT_NAME = slack_bot_name sickbeard.SLACK_ICON_URL = slack_icon_url - sickbeard.USE_DISCORDAPP = config.checkbox_to_value(use_discordapp) - sickbeard.DISCORDAPP_NOTIFY_ONSNATCH = config.checkbox_to_value(discordapp_notify_onsnatch) - sickbeard.DISCORDAPP_NOTIFY_ONDOWNLOAD = config.checkbox_to_value(discordapp_notify_ondownload) - sickbeard.DISCORDAPP_NOTIFY_ONSUBTITLEDOWNLOAD = config.checkbox_to_value(discordapp_notify_onsubtitledownload) - sickbeard.DISCORDAPP_ACCESS_TOKEN = discordapp_access_token - sickbeard.DISCORDAPP_AS_AUTHED = config.checkbox_to_value(discordapp_as_authed) - sickbeard.DISCORDAPP_USERNAME = discordapp_username - sickbeard.DISCORDAPP_ICON_URL = discordapp_icon_url - sickbeard.DISCORDAPP_AS_TTS = config.checkbox_to_value(discordapp_as_tts) + sickbeard.USE_DISCORD = config.checkbox_to_value(use_discord) + sickbeard.DISCORD_NOTIFY_ONSNATCH = config.checkbox_to_value(discord_notify_onsnatch) + sickbeard.DISCORD_NOTIFY_ONDOWNLOAD = config.checkbox_to_value(discord_notify_ondownload) + sickbeard.DISCORD_NOTIFY_ONSUBTITLEDOWNLOAD = config.checkbox_to_value(discord_notify_onsubtitledownload) + sickbeard.DISCORD_ACCESS_TOKEN = discord_access_token + sickbeard.DISCORD_AS_AUTHED = config.checkbox_to_value(discord_as_authed) + sickbeard.DISCORD_USERNAME = discord_username + sickbeard.DISCORD_ICON_URL = discord_icon_url + sickbeard.DISCORD_AS_TTS = config.checkbox_to_value(discord_as_tts) sickbeard.USE_GITTER = config.checkbox_to_value(use_gitter) sickbeard.GITTER_NOTIFY_ONSNATCH = config.checkbox_to_value(gitter_notify_onsnatch)