mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-10 18:06:37 +02:00
Don't consider it an error if there is nothing to export
With --after, no new messages in the given period will now result in an empty export, rather than an error exit.
This commit is contained in:
parent
b39d015133
commit
ebbad6db06
1 changed files with 3 additions and 3 deletions
|
@ -40,10 +40,10 @@ public class ChannelExporter(DiscordClient discord)
|
|||
// Check if the 'after' boundary is valid
|
||||
if (request.After is not null && !request.Channel.MayHaveMessagesAfter(request.After.Value))
|
||||
{
|
||||
throw new DiscordChatExporterException(
|
||||
$"Channel '{request.Channel.Name}' "
|
||||
console.Error.WriteLine(
|
||||
$"NOTE: Channel '{request.Channel.Name}' "
|
||||
+ $"of guild '{request.Guild.Name}' "
|
||||
+ $"does not contain any messages within the specified period."
|
||||
+ $"does not contain any messages within the specified period; an empty file will be created."
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue