コード例 #1
0
        internal RoleData(RestDiscordClient client, AuditLogEntryModel model, bool isCreated)
        {
            var changes = new RoleChanges(client, model);

            if (isCreated)
            {
                Name          = changes.Name.NewValue;
                Permissions   = changes.Permissions.NewValue;
                Color         = changes.Color.NewValue;
                IsHoisted     = changes.IsHoisted.NewValue;
                IsMentionable = changes.IsMentionable.NewValue;
            }
            else
            {
                Name          = changes.Name.OldValue;
                Permissions   = changes.Permissions.OldValue;
                Color         = changes.Color.OldValue;
                IsHoisted     = changes.IsHoisted.OldValue;
                IsMentionable = changes.IsMentionable.OldValue;
            }
        }
コード例 #2
0
 internal RestRoleUpdatedAuditLog(RestDiscordClient client, AuditLogModel log, AuditLogEntryModel entry) : base(client, log, entry)
 {
     Changes = new RoleChanges(client, entry);
 }