Fix deprecation warning in discord notifier (#52197)

This commit is contained in:
Joakim Sørensen 2021-06-26 13:12:10 +02:00 committed by GitHub
parent 568e1b379d
commit b7c15d4474
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,7 +112,6 @@ class DiscordNotificationService(BaseNotificationService):
await channel.send(message, files=files)
except (discord.errors.HTTPException, discord.errors.NotFound) as error:
_LOGGER.warning("Communication error: %s", error)
await discord_bot.logout()
await discord_bot.close()
# Using reconnect=False prevents multiple ready events to be fired.