コード例 #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
ファイル: RpcUser.cs プロジェクト: Lelouch99/bot_cc
        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
ファイル: RpcVoiceState.cs プロジェクト: NeKzor/Discord.Net
 internal RpcVoiceState(DiscordRpcClient discord, ulong userId)
 {
     User = new RpcUser(discord, userId);
 }