mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2024-09-19 12:18:48 -04:00
parent
1438fd9f77
commit
a0a263f074
1 changed files with 8 additions and 1 deletions
|
@ -22,11 +22,18 @@ public class ChannelExporter
|
||||||
{
|
{
|
||||||
// Forum channels don't have messages, they are just a list of threads
|
// Forum channels don't have messages, they are just a list of threads
|
||||||
if (request.Channel.Kind == ChannelKind.GuildForum)
|
if (request.Channel.Kind == ChannelKind.GuildForum)
|
||||||
throw new DiscordChatExporterException("Channel is a forum.");
|
{
|
||||||
|
throw new DiscordChatExporterException(
|
||||||
|
"Channel is a forum and cannot be exported directly. "
|
||||||
|
+ "You need to pull its threads and export them individually."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Check if the channel is empty
|
// Check if the channel is empty
|
||||||
if (request.Channel.IsEmpty)
|
if (request.Channel.IsEmpty)
|
||||||
|
{
|
||||||
throw new DiscordChatExporterException("Channel does not contain any messages.");
|
throw new DiscordChatExporterException("Channel does not contain any messages.");
|
||||||
|
}
|
||||||
|
|
||||||
// Check if the 'after' boundary is valid
|
// Check if the 'after' boundary is valid
|
||||||
if (request.After is not null && !request.Channel.MayHaveMessagesAfter(request.After.Value))
|
if (request.After is not null && !request.Channel.MayHaveMessagesAfter(request.After.Value))
|
||||||
|
|
Loading…
Reference in a new issue