mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Added pylint ignore message and re-added .close()
This commit is contained in:
parent
c1f3ce78e1
commit
b952cfe705
@ -44,11 +44,12 @@ class DiscordNotificationService(BaseNotificationService):
|
|||||||
|
|
||||||
@discord_bot.event
|
@discord_bot.event
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def on_ready():
|
def on_ready(): # pylint: disable=unused-variable
|
||||||
"""Send the messages when the bot is ready."""
|
"""Send the messages when the bot is ready."""
|
||||||
for channelid in kwargs[ATTR_TARGET]:
|
for channelid in kwargs[ATTR_TARGET]:
|
||||||
channel = discord.Object(id=channelid)
|
channel = discord.Object(id=channelid)
|
||||||
yield from discord_bot.send_message(channel, message)
|
yield from discord_bot.send_message(channel, message)
|
||||||
yield from discord_bot.logout()
|
yield from discord_bot.logout()
|
||||||
|
yield from discord_bot.close()
|
||||||
|
|
||||||
yield from discord_bot.start(self.token)
|
yield from discord_bot.start(self.token)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user