diff --git a/src/logs/guild_logs.py b/src/logs/guild_logs.py index 3b86b53..713492c 100644 --- a/src/logs/guild_logs.py +++ b/src/logs/guild_logs.py @@ -38,6 +38,7 @@ class GuildLogs: target_channels: List[discord.TextChannel] = [], *, fast: bool, + fresh: bool, ) -> Tuple[int, int]: global current_analysis if self.log_file in current_analysis: @@ -123,7 +124,7 @@ class GuildLogs: f"Reading new history...\n0 messages in 0/{max_chan:,} channels\n(this might take a while)", ) for channel in target_channels: - if channel.id not in self.channels: + if channel.id not in self.channels or fresh: loading_new += 1 self.channels[channel.id] = ChannelLogs(channel) start_msg = len(self.channels[channel.id].messages) diff --git a/src/scanners/scanner.py b/src/scanners/scanner.py index 7c87322..058337e 100644 --- a/src/scanners/scanner.py +++ b/src/scanners/scanner.py @@ -52,7 +52,7 @@ class Scanner(ABC): elif re.match(r"^<#!?\d+>$", arg): arg = arg[3:-1] if "!" in arg else arg[2:-1] if ( - arg not in self.valid_args + ["me", "here", "fast"] + arg not in self.valid_args + ["me", "here", "fast", "fresh"] and (not arg.isdigit() or not self.has_digit_args) and arg not in str_channel_mentions and arg not in str_mentions @@ -93,7 +93,7 @@ class Scanner(ABC): allowed_mentions=discord.AllowedMentions.none(), ) total_msg, total_chan = await logs.load( - progress, self.channels, fast="fast" in args + progress, self.channels, fast="fast" in args, fresh="fresh" in args ) if total_msg == CANCELLED: await message.channel.send( diff --git a/src/utils/utils.py b/src/utils/utils.py index 89c5621..e32e4a4 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -12,6 +12,7 @@ COMMON_HELP_ARGS = ( + "* @member/me - filter for one or more member\n" + "* #channel/here - filter for one or more channel\n" + "* fast - only read cache\n" + + "* fresh - does not read cache (long)\n" )