diff options
author | 2022-09-11 01:18:47 +0100 | |
---|---|---|
committer | 2022-10-02 18:34:03 +0100 | |
commit | f2d05d554f012598bcd42b4888400ced6513cb0d (patch) | |
tree | ffdd6a3ef7274195b4234866bc99fa16add2d090 | |
parent | Report on all autoban filters added in the last 7 days (diff) |
Send weekly_autoban_report to ctx channel when manually invoked
-rw-r--r-- | bot/exts/filters/filter_lists.py | 10 |
1 files 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) |