mirror of https://github.com/oliverbooth/X10D
feat: add support for new usernames
user discriminators become "0" if the user has a new username, distinct from "0000" for webhooks.
This commit is contained in:
parent
103e037dc8
commit
678dd914d4
|
@ -77,6 +77,12 @@ public static class DiscordUserExtensions
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (user.Discriminator == "0")
|
||||||
|
{
|
||||||
|
// user has a new username. see: https://discord.com/blog/usernames
|
||||||
|
return user.Username;
|
||||||
|
}
|
||||||
|
|
||||||
return $"{user.Username}#{user.Discriminator}";
|
return $"{user.Username}#{user.Discriminator}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue