internal RpcMessage(DiscordRpcClient discord, ulong id, RestVirtualMessageChannel channel, RpcUser author, MessageSource source) : base(discord, id) { Channel = channel; Author = author; Source = source; }
internal static RpcUser Create(DiscordRpcClient discord, Model model) { var entity = new RpcUser(discord, model.Id); entity.Update(model); return(entity); }
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); }
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); }
internal RpcSystemMessage(DiscordRpcClient discord, ulong id, RestVirtualMessageChannel channel, RpcUser author) : base(discord, id, channel, author, MessageSource.System) { }
internal RpcUserMessage(DiscordRpcClient discord, ulong id, RestVirtualMessageChannel channel, RpcUser author) : base(discord, id, channel, author) { }
internal RpcVoiceState(DiscordRpcClient discord, ulong userId) { User = new RpcUser(discord, userId); }