Example #1
0
        internal new static RestStageChannel Create(BaseDiscordClient discord, IGuild guild, Model model)
        {
            var entity = new RestStageChannel(discord, guild, model.Id);

            entity.Update(model);
            return(entity);
        }
Example #2
0
 internal static RestGuildChannel Create(BaseDiscordClient discord, IGuild guild, Model model)
 {
     return(model.Type switch
     {
         ChannelType.News => RestNewsChannel.Create(discord, guild, model),
         ChannelType.Text => RestTextChannel.Create(discord, guild, model),
         ChannelType.Voice => RestVoiceChannel.Create(discord, guild, model),
         ChannelType.Stage => RestStageChannel.Create(discord, guild, model),
         ChannelType.Category => RestCategoryChannel.Create(discord, guild, model),
         ChannelType.PublicThread or ChannelType.PrivateThread or ChannelType.NewsThread => RestThreadChannel.Create(discord, guild, model),
         _ => new RestGuildChannel(discord, guild, model.Id),
     });