diff --git a/cogs/da.py b/cogs/da.py index 866792a..653d1d3 100644 --- a/cogs/da.py +++ b/cogs/da.py @@ -76,7 +76,7 @@ class Deviantart: result = cache.get(da_name, None) if result is None: params['username'] = da_name - data = await utils.request(base_url, payload=params) + data = await utils.request(self.base_url, payload=params) log.warning("DA responded with {}".format(data)) result = data['results'][0] diff --git a/cogs/picarto.py b/cogs/picarto.py index 39fbb00..7f76348 100644 --- a/cogs/picarto.py +++ b/cogs/picarto.py @@ -77,6 +77,8 @@ class Picarto: channel = self.bot.get_channel(channel_id) # Get the member that has just gone live member = discord.utils.get(server.members, id=m_id) + if member is None: + continue fmt = "{} has just gone live! View their stream at {}".format(member.display_name, url) await self.bot.send_message(channel, fmt) diff --git a/cogs/twitch.py b/cogs/twitch.py index 5e1adc3..80d37c8 100644 --- a/cogs/twitch.py +++ b/cogs/twitch.py @@ -70,6 +70,8 @@ class Twitch: channel = self.bot.get_channel(channel_id) # Get the member that has just gone live member = discord.utils.get(server.members, id=m_id) + if member is None: + continue fmt = "{} has just gone live! View their stream at {}".format(member.display_name, url) await self.bot.send_message(channel, fmt)