diff options
| author | 2019-01-07 20:30:30 -0500 | |
|---|---|---|
| committer | 2019-01-07 20:30:30 -0500 | |
| commit | 3b3f8794cca30b152a7747e3ae7e061328a38ba6 (patch) | |
| tree | bdc6b868947ec71ae074d3d08936fa787df3ff23 | |
| parent | Fix off by one (diff) | |
Update method of obtaining last message to be simpler
| -rw-r--r-- | bot/cogs/free.py | 3 | 
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/cogs/free.py b/bot/cogs/free.py index 90caad7ae..cd04275e2 100644 --- a/bot/cogs/free.py +++ b/bot/cogs/free.py @@ -46,8 +46,7 @@ class Free:                  messages = await channel.history(limit=seek).flatten()                  msg = messages[seek-1]              else: -                messages = await channel.history(limit=1).flatten() -                msg = messages[0] +                msg = await channel.history(limit=1).next()              inactive = (datetime.utcnow() - msg.created_at).seconds              if inactive > self.TIME_INACTIVE:  |