mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix: correctly handle missing role cache in message embed
This commit is contained in:
parent
08c5b78cc2
commit
21e3e61db0
2 changed files with 10 additions and 3 deletions
|
|
@ -40,7 +40,7 @@ namespace Myriad.Extensions
|
|||
public static Role GetRole(this IDiscordCache cache, ulong roleId)
|
||||
{
|
||||
if (!cache.TryGetRole(roleId, out var role))
|
||||
throw new KeyNotFoundException($"User {roleId} not found in cache");
|
||||
throw new KeyNotFoundException($"Role {roleId} not found in cache");
|
||||
return role;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue