effectiveName

The user's effective name, prioritizing globalName over username.

API note:

This is implemented as an extension property to avoid virtual dispatch in cases like the following:

fun useUser(user: User) = println(user.effectiveName)
fun useMember(member: Member) = println(member.effectiveName)

val member: Member = TODO()
useUser(member) // prints the global display name
useMember(member) // prints the guild-specific nickname