Ejemplo n.º 1
0
        public TransientThreadAuditLogData(IClient client, AuditLogEntryJsonModel model, bool isCreated)
        {
            var changes = new TransientThreadAuditLogChanges(client, model);

            if (isCreated)
            {
                Name       = changes.Name.NewValue;
                IsArchived = changes.IsArchived.NewValue;
                IsLocked   = changes.IsLocked.NewValue;
                AutomaticArchiveDuration = changes.AutomaticArchiveDuration.NewValue;
                Slowmode = changes.Slowmode.NewValue;
                Type     = changes.Type.NewValue;
            }
            else
            {
                Name       = changes.Name.OldValue;
                IsArchived = changes.IsArchived.OldValue;
                IsLocked   = changes.IsLocked.OldValue;
                AutomaticArchiveDuration = changes.AutomaticArchiveDuration.OldValue;
                Slowmode = changes.Slowmode.OldValue;
                Type     = changes.Type.OldValue;
            }
        }
 public TransientThreadUpdatedAuditLog(IClient client, Snowflake guildId, AuditLogJsonModel auditLogJsonModel, AuditLogEntryJsonModel model)
     : base(client, guildId, auditLogJsonModel, model)
 {
     Changes = new TransientThreadAuditLogChanges(client, model);
 }