コード例 #1
0
        public TransientWebhookAuditLogData(IClient client, AuditLogEntryJsonModel model, bool isCreated)
        {
            var changes = new TransientWebhookAuditLogChanges(client, model);

            if (isCreated)
            {
                Name          = changes.Name.NewValue;
                Type          = changes.Type.NewValue;
                AvatarHash    = changes.AvatarHash.NewValue;
                ChannelId     = changes.ChannelId.NewValue;
                ApplicationId = changes.ApplicationId.NewValue;
            }
            else
            {
                Name          = changes.Name.OldValue;
                Type          = changes.Type.OldValue;
                AvatarHash    = changes.AvatarHash.OldValue;
                ChannelId     = changes.ChannelId.OldValue;
                ApplicationId = changes.ApplicationId.OldValue;
            }
        }
コード例 #2
0
 public TransientWebhookUpdatedAuditLog(IClient client, Snowflake guildId, AuditLogJsonModel auditLogJsonModel, AuditLogEntryJsonModel model)
     : base(client, guildId, auditLogJsonModel, model)
 {
     Changes = new TransientWebhookAuditLogChanges(client, model);
 }