internal static SocketInteractionData Create(DiscordSocketClient client, Model model, ulong guildId)
        {
            var entity = new SocketInteractionData(client, model.Id);

            entity.Update(model, guildId);
            return(entity);
        }
Example #2
0
        internal void Update(Model model)
        {
            Data = model.Data.IsSpecified
                ? SocketInteractionData.Create(Discord, model.Data.Value, model.GuildId)
                : null;

            GuildId   = model.GuildId;
            ChannelId = model.ChannelId;
            Token     = model.Token;
            Version   = model.Version;
            UserId    = model.Member.User.Id;
            Type      = model.Type;
        }
Example #3
0
        internal void Update(Model model)
        {
            this.Data = model.Data.IsSpecified
                ? SocketInteractionData.Create(this.Discord, model.Data.Value)
                : null;

            this.GuildId   = model.GuildId;
            this.ChannelId = model.ChannelId;
            this.Token     = model.Token;
            this.Version   = model.Version;
            this.MemberId  = model.Member.User.Id;
            this.Type      = model.Type;
        }