void HandleChannelPinsUpdateEvent(DiscordApiData data) { DateTime? lastPinTimestamp = data.GetDateTime("last_pin_timestamp"); Snowflake channelId = data.GetSnowflake("channel_id").Value; OnChannelPinsUpdated?.Invoke(this, new ChannelPinsUpdateEventArgs(shard, channelId, lastPinTimestamp)); }
internal DiscordGuildMetadata(DiscordApiData data) { GuildId = data.GetSnowflake("id").Value; IsLarge = data.GetBoolean("large") ?? false; JoinedAt = data.GetDateTime("joined_at").Value; MemberCount = data.GetInteger("member_count").Value; }
public void Update(DiscordApiData data) { Nickname = data.GetString("nick"); JoinedAt = data.GetDateTime("joined_at").Value; IsDeaf = data.GetBoolean("deaf") ?? false; IsMute = data.GetBoolean("mute") ?? false; UpdateRoles(data); Dirty(); }