-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement AuditLog Entry Create event data (#132)
* Implement AuditLog Entry Create data * Handle GUILD_AUDIT_LOG_ENTRY_CREATE with the new data * bad copy and paste in guildId * Remove unused import
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/main/java/discord4j/discordjson/json/gateway/AuditLogEntryCreate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package discord4j.discordjson.json.gateway; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.Id; | ||
import discord4j.discordjson.json.AuditLogEntryData; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableAuditLogEntryCreate.class) | ||
@JsonDeserialize(as = ImmutableAuditLogEntryCreate.class) | ||
public interface AuditLogEntryCreate extends Dispatch, AuditLogEntryData { | ||
|
||
static ImmutableAuditLogEntryCreate.Builder builder() { | ||
return ImmutableAuditLogEntryCreate.builder(); | ||
} | ||
|
||
@JsonProperty("guild_id") | ||
Id guildId(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"d": { | ||
"action_type": 25, | ||
"changes": [ | ||
{ | ||
"key": "$add", | ||
"new_value": [ | ||
{ | ||
"id": "983184100192030760", | ||
"name": "A role" | ||
}, | ||
{ | ||
"id": "911398373213495346", | ||
"name": "Another role" | ||
} | ||
] | ||
} | ||
], | ||
"guild_id": "405699020564987914", | ||
"id": "1063915417652973640", | ||
"target_id": "729374111482249276", | ||
"user_id": "729374111482249276" | ||
}, | ||
"op": 0, | ||
"s": 211724, | ||
"t": "GUILD_AUDIT_LOG_ENTRY_CREATE" | ||
} |