Skip to content

Commit d957e2d

Browse files
authored
Filtering: fix ban flow
1 parent 874978e commit d957e2d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bot/exts/filters/filtering.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,12 @@ async def _filter_message(self, msg: Message, delta: Optional[int] = None) -> No
369369
# We create a new context from that message and make sure the staffer is the bot
370370
# and the feedback message is sent in #mod-alert
371371
context = await self.bot.get_context(msg)
372-
context.author = self.bot.user
372+
context.author = self.bot.get_guild(Guild.id).get_member(self.bot.user.id)
373373
context.channel = self.bot.get_channel(Channels.mod_alerts)
374+
context.command = self.bot.get_command("tempban")
374375

375376
await context.invoke(
376-
self.bot.get_command("tempban"),
377+
context.command,
377378
msg.author,
378379
arrow.utcnow() + AUTO_BAN_DURATION,
379380
reason=AUTO_BAN_REASON

0 commit comments

Comments
 (0)