mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-13 06:34:23 -04:00
Also consider empty channel as a non error
This commit is contained in:
parent
d505d43604
commit
2149f8cfa2
1 changed files with 4 additions and 2 deletions
|
@ -30,10 +30,12 @@ public class ChannelExporter(DiscordClient discord)
|
||||||
// Check if the channel is empty
|
// Check if the channel is empty
|
||||||
if (request.Channel.IsEmpty)
|
if (request.Channel.IsEmpty)
|
||||||
{
|
{
|
||||||
throw new DiscordChatExporterException(
|
// FIXME: need to ensure an empty export file is created right here
|
||||||
|
|
||||||
|
throw new ChannelNotExportedException(
|
||||||
$"Channel '{request.Channel.Name}' "
|
$"Channel '{request.Channel.Name}' "
|
||||||
+ $"of guild '{request.Guild.Name}' "
|
+ $"of guild '{request.Guild.Name}' "
|
||||||
+ $"does not contain any messages."
|
+ $"does not contain any messages; an empty file will be created."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue