forked from home-assistant/core
Fix channel.send in Discord (#58756)
This commit is contained in:
committed by
Paulus Schoutsen
parent
0f367722ed
commit
2cc3290794
@@ -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
|
||||
|
Reference in New Issue
Block a user