public void addEntries ( JsonNode data ) { for ( JsonNode webhookJson : data . get ( "webhooks" ) ) { boolean alreadyAdded = involvedWebhooks . stream ( ) . anyMatch ( webhook -> webhook . getId ( ) == webhookJson . get ( "id" ) . asLong ( ) ) ; if ( ! alreadyAdded ) { involvedWebhooks . add ( new WebhookImpl ( api , webhookJson ) ) ; } } for ( JsonNode userJson : data . get ( "users" ) ) { boolean alreadyAdded = involvedUsers . stream ( ) . anyMatch ( user -> user . getId ( ) == userJson . get ( "id" ) . asLong ( ) ) ; if ( ! alreadyAdded ) { involvedUsers . add ( ( ( DiscordApiImpl ) api ) . getOrCreateUser ( userJson ) ) ; } } for ( JsonNode entry : data . get ( "audit_log_entries" ) ) { entries . add ( new AuditLogEntryImpl ( this , entry ) ) ; } }
Adds entries to the audit log .