Modify debug output of twitch notifications cog
This commit is contained in:
parent
d308ea0c06
commit
881c900e6d
|
|
@ -21,7 +21,7 @@ class TwitchNotificationsCog(Cog):
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_ready(self):
|
async def on_ready(self):
|
||||||
await self.load_config()
|
await self.load_config()
|
||||||
self.guild = await Guilds().get_guild(self.bot)
|
self.guild = Guilds().get_guild(self.bot)
|
||||||
self.twitch = Twitch(self.config[self.guild.name]["twitch"]["client_id"], self.config[self.guild.name]["twitch"]["client_secret"])
|
self.twitch = Twitch(self.config[self.guild.name]["twitch"]["client_id"], self.config[self.guild.name]["twitch"]["client_secret"])
|
||||||
await self.set_access_token_and_expires_date()
|
await self.set_access_token_and_expires_date()
|
||||||
await self.set_notification_channel_and_purge_channel()
|
await self.set_notification_channel_and_purge_channel()
|
||||||
|
|
@ -62,13 +62,12 @@ class TwitchNotificationsCog(Cog):
|
||||||
async def check_twitch_online_streamers(self):
|
async def check_twitch_online_streamers(self):
|
||||||
print("Online streamers are checked")
|
print("Online streamers are checked")
|
||||||
channel = await Channels().get_channel(self.guild, self.config[self.guild.name]["twitch"]["channel_name"])
|
channel = await Channels().get_channel(self.guild, self.config[self.guild.name]["twitch"]["channel_name"])
|
||||||
print(channel)
|
|
||||||
if not channel:
|
if not channel:
|
||||||
return
|
return
|
||||||
|
|
||||||
watchlist_notifications = self.bot.db.session.query(TwitchLiveNotification).all()
|
watchlist_notifications = self.bot.db.session.query(TwitchLiveNotification).all()
|
||||||
watchlist = [notify.username for notify in watchlist_notifications]
|
watchlist = [notify.username for notify in watchlist_notifications]
|
||||||
print("WATCHLIST", watchlist)
|
print("Twitch Watchlist: ", watchlist)
|
||||||
|
|
||||||
online_notifications, offline_notifications = await self.twitch.get_notifications(watchlist)
|
online_notifications, offline_notifications = await self.twitch.get_notifications(watchlist)
|
||||||
print("online_notifications", online_notifications)
|
print("online_notifications", online_notifications)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue