BadgeAPI: fix bugs in new profiles

This commit is contained in:
Vendicated 2024-06-26 18:09:21 +02:00
parent e0d99e2f6c
commit bc0d4a80ff
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
4 changed files with 75 additions and 20 deletions

View file

@ -136,6 +136,8 @@ export default definePlugin({
},
getBadges(props: { userId: string; user?: User; guildId: string; }) {
if (!props) return [];
try {
props.userId ??= props.user?.id!;