示例#1
0
        internal new static RpcGroupChannel Create(DiscordRpcClient discord, Model model)
        {
            var entity = new RpcGroupChannel(discord, model.Id);

            entity.Update(model);
            return(entity);
        }
示例#2
0
        internal static RpcChannel CreatePrivate(DiscordRpcClient discord, Model model)
        {
            switch (model.Type)
            {
            case ChannelType.DM:
                return(RpcDMChannel.Create(discord, model));

            case ChannelType.Group:
                return(RpcGroupChannel.Create(discord, model));

            default:
                throw new InvalidOperationException($"Unexpected channel type: {model.Type}");
            }
        }