|
|
@@ -24,7 +24,14 @@ namespace Discord.Rest |
|
|
|
{ |
|
|
|
return model.Type switch |
|
|
|
{ |
|
|
|
ChannelType.News or ChannelType.Text or ChannelType.Voice => RestGuildChannel.Create(discord, new RestGuild(discord, model.GuildId.Value), model), |
|
|
|
ChannelType.News or |
|
|
|
ChannelType.Text or |
|
|
|
ChannelType.Voice or |
|
|
|
ChannelType.Stage or |
|
|
|
ChannelType.NewsThread or |
|
|
|
ChannelType.PrivateThread or |
|
|
|
ChannelType.PublicThread |
|
|
|
=> RestGuildChannel.Create(discord, new RestGuild(discord, model.GuildId.Value), model), |
|
|
|
ChannelType.DM or ChannelType.Group => CreatePrivate(discord, model) as RestChannel, |
|
|
|
ChannelType.Category => RestCategoryChannel.Create(discord, new RestGuild(discord, model.GuildId.Value), model), |
|
|
|
_ => new RestChannel(discord, model.Id), |
|
|
|