Пример #1
0
 internal RpcMessage(DiscordRpcClient discord, ulong id, RestVirtualMessageChannel channel, RpcUser author, MessageSource source)
     : base(discord, id)
 {
     Channel = channel;
     Author  = author;
     Source  = source;
 }
Пример #2
0
        internal static RpcUser Create(DiscordRpcClient discord, Model model)
        {
            var entity = new RpcUser(discord, model.Id);

            entity.Update(model);
            return(entity);
        }
Пример #3
0
        internal new static RpcSystemMessage Create(DiscordRpcClient discord, ulong channelId, Model model)
        {
            var entity = new RpcSystemMessage(discord, model.Id,
                                              RestVirtualMessageChannel.Create(discord, channelId),
                                              RpcUser.Create(discord, model.Author.Value, model.WebhookId.ToNullable()));

            entity.Update(model);
            return(entity);
        }
Пример #4
0
        internal static RpcUser Create(DiscordRpcClient discord, Model model, ulong?webhookId)
        {
            RpcUser entity;

            if (webhookId.HasValue)
            {
                entity = new RpcWebhookUser(discord, model.Id, webhookId.Value);
            }
            else
            {
                entity = new RpcUser(discord, model.Id);
            }
            entity.Update(model);
            return(entity);
        }
Пример #5
0
 internal RpcSystemMessage(DiscordRpcClient discord, ulong id, RestVirtualMessageChannel channel, RpcUser author)
     : base(discord, id, channel, author, MessageSource.System)
 {
 }
Пример #6
0
 internal RpcUserMessage(DiscordRpcClient discord, ulong id, RestVirtualMessageChannel channel, RpcUser author)
     : base(discord, id, channel, author)
 {
 }
Пример #7
0
 internal RpcVoiceState(DiscordRpcClient discord, ulong userId)
 {
     User = new RpcUser(discord, userId);
 }