Fix ShowBadgesInChat

This commit is contained in:
thororen1234 2024-07-18 01:25:42 -04:00
parent 61ea729381
commit 87ca13518b

View file

@ -126,21 +126,13 @@ function CheckBadge({ badge, author }: { badge: string; author: User; }): JSX.El
</span>
) : null;
case "DiscordNitro":
let premiumType: Number | undefined;
premiumType = author?.premiumType;
// @ts-ignore
if (author?._realPremiumType) {
// @ts-ignore
premiumType = author?._realPremiumType;
}
// @ts-ignore
return premiumType > 0 ? (
return (author?.premiumType ?? 0) > 0 ? (
<span style={{ order: settings.store.DiscordNitroPosition }}>
<RoleIconComponent
className={roleIconClassName}
name={
"Discord Nitro" +
(premiumType === 3 ? " Basic" : premiumType === 1 ? " Classic" : "")
(author.premiumType === 3 ? " Basic" : author.premiumType === 1 ? " Classic" : "")
}
size={20}
src={"https://cdn.discordapp.com/badge-icons/2ba85e8026a8614b640c2837bcdfe21b.png"}