コード例 #1
0
        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));
        }
コード例 #2
0
 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;
 }
コード例 #3
0
ファイル: MutableGuildMember.cs プロジェクト: Perksey/Discore
        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();
        }