Avoid touching config as much. (#88)

Could cache some of this on load as well, but this is a really cheap way to reduce the times interacting with config for now.
This commit is contained in:
Michael H
2019-12-12 20:00:57 -05:00
committed by aikaterna
parent df554b9c4a
commit eadf478714

View File

@@ -88,6 +88,8 @@ class Otherbot(BaseCog):
@listener()
async def on_member_update(self, before, after):
if after.guild is None or not after.bot:
return
data = await self.config.guild(after.guild).all()
if after.status == discord.Status.offline and (after.id in data["watching"]):
channel_object = self.bot.get_channel(data["reporting"])