mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-26 03:03:45 +00:00
@@ -1,6 +1,7 @@
|
||||
namespace DiscordChatExporter.Core.Models
|
||||
{
|
||||
// https://discordapp.com/developers/docs/resources/channel#channel-object-channel-types
|
||||
// Order of enum fields needs to match the order in the docs.
|
||||
|
||||
public enum ChannelType
|
||||
{
|
||||
@@ -8,6 +9,8 @@
|
||||
DirectTextChat,
|
||||
GuildVoiceChat,
|
||||
DirectGroupTextChat,
|
||||
Category
|
||||
GuildCategory,
|
||||
GuildNews,
|
||||
GuildStore
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,13 @@ namespace DiscordChatExporter.Core.Models
|
||||
{
|
||||
public static class Extensions
|
||||
{
|
||||
public static bool IsExportable(this ChannelType channelType) =>
|
||||
channelType == ChannelType.GuildTextChat ||
|
||||
channelType == ChannelType.DirectTextChat ||
|
||||
channelType == ChannelType.DirectGroupTextChat ||
|
||||
channelType == ChannelType.GuildNews ||
|
||||
channelType == ChannelType.GuildStore;
|
||||
|
||||
public static string GetFileExtension(this ExportFormat format) =>
|
||||
format switch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user