This commit is contained in:
spiral 2021-11-02 22:47:14 -04:00
parent 21e3e61db0
commit 29b28ba742
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -332,11 +332,13 @@ namespace PluralKit.Bot
if (roles != null && roles.Count > 0) if (roles != null && roles.Count > 0)
{ {
var rolesString = string.Join(", ", roles var rolesString = string.Join(", ", roles
.Select(id => { .Select(id =>
{
_cache.TryGetRole(id, out var role); _cache.TryGetRole(id, out var role);
if (role != null) if (role != null)
return role; return role;
return new Role() { return new Role()
{
Name = "*(unknown role)*", Name = "*(unknown role)*",
Position = 0, Position = 0,
}; };