From 887b53b794c409d1b6cf287f038e90b6502066c7 Mon Sep 17 00:00:00 2001 From: Christiaan Blom Date: Sat, 4 Mar 2017 01:31:19 +0100 Subject: [PATCH] Changes for Travis bot. Unused variable 'on_ready' will likely remain reported --- homeassistant/components/notify/discord.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/notify/discord.py b/homeassistant/components/notify/discord.py index 07b595b3945..8647ea8792e 100644 --- a/homeassistant/components/notify/discord.py +++ b/homeassistant/components/notify/discord.py @@ -27,6 +27,7 @@ def get_service(hass, config, discovery_info=None): token = config.get(CONF_TOKEN) return DiscordNotificationService(hass, token) + class DiscordNotificationService(BaseNotificationService): """Implement the notification service for Discord.""" @@ -44,10 +45,10 @@ class DiscordNotificationService(BaseNotificationService): @discord_bot.event @asyncio.coroutine def on_ready(): + """sends the messages when the bot is ready""" for channelid in kwargs[ATTR_TARGET]: channel = discord.Object(id=channelid) yield from discord_bot.send_message(channel, message) yield from discord_bot.logout() yield from discord_bot.start(self.token) -