Fixed using globalname

This commit is contained in:
Inbestigator 2024-03-21 21:03:07 -07:00
parent a33106253c
commit 107140a4c1

View file

@ -44,11 +44,11 @@ async function showNotification(message: Message, guildId: string | undefined):
}); });
message.content = message.content.replace(userRegex, (match, userId: string) => { message.content = message.content.replace(userRegex, (match, userId: string) => {
return `@${UserStore.getUser(userId)?.globalName}`; return `@${(UserStore.getUser(userId) as any).globalName}`;
}); });
await Notifications.showNotification({ await Notifications.showNotification({
title: `${message.author.globalName} ${guildId ? `(#${channel?.name}, ${ChannelStore.getChannel(channel?.parent_id)?.name})` : ""}`, title: `${(message.author as any).globalName} ${guildId ? `(#${channel?.name}, ${ChannelStore.getChannel(channel?.parent_id)?.name})` : ""}`,
body: message.content, body: message.content,
icon: UserStore.getUser(message.author.id).getAvatarURL(undefined, undefined, false), icon: UserStore.getUser(message.author.id).getAvatarURL(undefined, undefined, false),
onClick: function (): void { onClick: function (): void {