diff options
author | 2019-10-11 14:56:17 -0700 | |
---|---|---|
committer | 2019-10-11 14:56:17 -0700 | |
commit | 80d6bb313a2d83a1d78340b403d315b52438c0dd (patch) | |
tree | aa73b4080ecb7405f89983c0e8d489aae244ed13 | |
parent | Revise comments and the doctsring for the periodic ping function (diff) |
Check that the periodic ping author is the bot
-rw-r--r-- | bot/cogs/verification.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/verification.py b/bot/cogs/verification.py index 491e74076..bd18a7eba 100644 --- a/bot/cogs/verification.py +++ b/bot/cogs/verification.py @@ -170,7 +170,7 @@ class Verification(Cog): need_to_post = True # True if a new message needs to be sent. async for message in messages: - if message.content == PERIODIC_PING: + if message.author == self.bot.user and message.content == PERIODIC_PING: delta = datetime.utcnow() - message.created_at # Time since last message. if delta.days >= 7: # Message is older than a week. await message.delete() |