Fix purge ctx references
This commit is contained in:
parent
30f21c6b85
commit
a44f52a1f3
1 changed files with 2 additions and 2 deletions
|
@ -80,7 +80,7 @@ class AdminCog(commands.Cog):
|
|||
await self._kick(ctx, user, reason)
|
||||
|
||||
async def _purge(self, ctx, amount: int = 30):
|
||||
channel = ctx.message.channel
|
||||
channel = ctx.channel
|
||||
messages = []
|
||||
async for message in channel.history(limit=amount + 1):
|
||||
messages.append(message)
|
||||
|
@ -88,7 +88,7 @@ class AdminCog(commands.Cog):
|
|||
self.db.purges.insert_one(
|
||||
{
|
||||
"channel": ctx.channel.id,
|
||||
"guild": ctx.channel.guild.id,
|
||||
"guild": ctx.guild.id,
|
||||
"admin": ctx.author.id,
|
||||
"count": amount,
|
||||
"time": datetime.now(),
|
||||
|
|
Loading…
Add table
Reference in a new issue