From 81845bb0b5fc3af93540e2adb168bdb57cad3f55 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Sun, 31 Oct 2021 13:32:49 +0100 Subject: [PATCH] Fix channel.send in Discord (#58756) --- homeassistant/components/discord/notify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/discord/notify.py b/homeassistant/components/discord/notify.py index 10ad1e8e018..16f30fbf051 100644 --- a/homeassistant/components/discord/notify.py +++ b/homeassistant/components/discord/notify.py @@ -94,9 +94,9 @@ class DiscordNotificationService(BaseNotificationService): for channelid in kwargs[ATTR_TARGET]: channelid = int(channelid) try: - channel = discord_bot.fetch_channel( + channel = await discord_bot.fetch_channel( channelid - ) or discord_bot.fetch_user(channelid) + ) or await discord_bot.fetch_user(channelid) except discord.NotFound: _LOGGER.warning("Channel not found for ID: %s", channelid) continue