mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Fix channel.send in Discord (#58756)
This commit is contained in:
parent
968e582468
commit
81845bb0b5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user