fix: cocoreact no longer tries to check guild configs while in dms

This commit is contained in:
Seaswimmer 2023-08-07 20:41:23 -04:00
parent b41fb3c085
commit 7f210d016d
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -67,6 +67,7 @@ class Galaxy(commands.Cog):
@commands.Cog.listener('on_message') @commands.Cog.listener('on_message')
async def cocoreact(self, message): async def cocoreact(self, message):
if message.guild is not None:
emoji = self.bot.get_emoji(await self.config.guild(message.guild).cocoemoji()) emoji = self.bot.get_emoji(await self.config.guild(message.guild).cocoemoji())
cocotarget = await self.config.guild(message.guild).cocotarget() cocotarget = await self.config.guild(message.guild).cocotarget()
if cocotarget == 0: if cocotarget == 0: