If you DM the bot a request that causes an unchecked access to a guild config, as in the new feature added to the inat obs command that places emojis for certain project IDs on the observation title line, then an exception is raised:
[2019-11-03 19:54:12] [ERROR] red: Exception in command 'inat obs'
Traceback (most recent call last):
File "C:\Python37\lib\site-packages\discord\ext\commands\core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "C:\Users\Ben\work\quaggagriff\inatcog\inatcog.py", line 145, in obs
embed=await self.make_obs_embed(ctx, obs, url, preview=False)
File "C:\Users\Ben\work\quaggagriff\inatcog\inat_embeds.py", line 77, in make_obs_embed
project_emojis = await self.config.guild(ctx.guild).project_emojis()
File "C:\Python37\lib\site-packages\redbot\core\config.py", line 881, in guild
return self._get_base_group(self.GUILD, str(guild.id))
AttributeError: 'NoneType' object has no attribute 'id'
There needs to be a global config if this feature is also supposed to work in DM to the bot.
The guild config should not be checked in a direct message.
If you DM the bot a request that causes an unchecked access to a guild config, as in the new feature added to the
inat obs
command that places emojis for certain project IDs on the observation title line, then an exception is raised:Ben