Skip to content

Commit

Permalink
Use global_name as display_name if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ushitora-anqou committed Nov 8, 2023
1 parent 7c0e466 commit 6eb14bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/guild.ml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ let update_voice_state state

let get_display_name : Discord.Object.guild_member -> string option = function
| { nick = Some nick; _ } -> Some nick
| { user = Some { global_name = Some global_name; _ }; _ } -> Some global_name
| { user = Some { username; _ }; _ } -> Some username
| _ -> None

Expand Down

0 comments on commit 6eb14bc

Please sign in to comment.