mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-18 11:23:46 +12:00
fixed stats being tracked in dms and failing
This commit is contained in:
parent
af238f4a64
commit
e55b3b2802
|
@ -1074,7 +1074,8 @@ class ActivityLogger(commands.Cog):
|
|||
else:
|
||||
entry = MESSAGE_TEMPLATE.format(message)
|
||||
|
||||
if message.author.id != self.bot.user.id: # don't calculate bot stats
|
||||
# don't calculate bot stats and make sure this isnt dm message
|
||||
if message.author.id != self.bot.user.id and isinstance(message.author, discord.Member):
|
||||
async with self.config.member(message.author).stats() as stats:
|
||||
stats["total_msg"] += 1
|
||||
if len(message.content) > 0 and message.content[0] in self.cache[message.guild.id]["prefixes"]:
|
||||
|
|
Loading…
Reference in a new issue