Ejemplo n.º 1
0
            public Reaction(JObject data)
            {
                JsonObjectReader r = data.GetReader();

                ReactorId = r.ReadSnowflake("user_id");
                MessageId = r.ReadSnowflake("message_id");
                ChannelId = r.ReadSnowflake("channel_id");
                JsonObjectReader re      = r.ReadObject("emoji");
                ulong?           emojiId = re.ReadNullableSnowflake("id");
                string           name    = re.ReadString("name");

                Emoji = emojiId != null ? (Emoji) new LazyServerEmoji((ulong)emojiId, name) : new GlobalEmoji(name);
            }