From f2d05d554f012598bcd42b4888400ced6513cb0d Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Sun, 11 Sep 2022 01:18:47 +0100 Subject: Send weekly_autoban_report to ctx channel when manually invoked --- bot/exts/filters/filter_lists.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bot/exts/filters/filter_lists.py b/bot/exts/filters/filter_lists.py index 2d8698fcc..edc2d09f3 100644 --- a/bot/exts/filters/filter_lists.py +++ b/bot/exts/filters/filter_lists.py @@ -295,8 +295,8 @@ class FilterLists(Cog): @command(name="filter_report") async def force_send_weekly_report(self, ctx: Context) -> None: - """Send a list of autobans added in the last 7 days to #mod-meta.""" - await self.send_weekly_autoban_report() + """Respond with a list of autobans added in the last 7 days.""" + await self.send_weekly_autoban_report(ctx.channel) @tasks.loop(time=datetime.time(hour=18)) async def weekly_autoban_report_task(self) -> None: @@ -307,7 +307,11 @@ class FilterLists(Cog): await self.send_weekly_autoban_report() async def send_weekly_autoban_report(self, channel: discord.abc.Messageable = None) -> None: - """Send a list of autobans added in the last 7 days to #mod-meta.""" + """ + Send a list of autobans added in the last 7 days to the specified channel. + + If chanel is not specified, it is sent to #mod-meta. + """ seven_days_ago = arrow.utcnow().shift(days=-7) if not channel: channel = self.bot.get_channel(Channels.mod_meta) -- cgit v1.2.3