Skip to content

Commit

Permalink
fix: user::format_username now returns the global_name if it's set
Browse files Browse the repository at this point in the history
  • Loading branch information
Commandserver committed Jul 17, 2023
1 parent 8a8d98e commit d21dfb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dpp/user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ std::string user::get_default_avatar_url() const {
}

std::string user::format_username() const {
if (!global_name.empty()) {
return global_name;
}
return username + '#' + leading_zeroes(discriminator, 4);
}

Expand Down

0 comments on commit d21dfb5

Please sign in to comment.