getAuditLogEntries
inline fun GuildBehavior.getAuditLogEntries(builder: AuditLogGetRequestBuilder.() -> Unit = {}): Flow<AuditLogEntry>(source)
The Audit log entries from this guild, configured by the builder.
The returned flow is lazily executed, any RequestException will be thrown on terminal operators instead.
val change = guild.getAuditLogEntries {
userId = user.id
action = AuditLogEvent.MemberUpdate
}.mapNotNull { it[AuditLogChangeKey.Nick] }.firstOrNull() ?: return
println("user changed nickname from $old to $new")
Content copied to clipboard