From 57a20ca3b4a478b4f3aba331d7fcaa1580075b90 Mon Sep 17 00:00:00 2001 From: gc <30398469+gc@users.noreply.github.com> Date: Sat, 13 Jul 2024 20:19:17 +1000 Subject: [PATCH] User mention/username changes --- src/lib/MUser.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/MUser.ts b/src/lib/MUser.ts index f250588d47..df94f648c9 100644 --- a/src/lib/MUser.ts +++ b/src/lib/MUser.ts @@ -1,4 +1,4 @@ -import { mentionCommand } from '@oldschoolgg/toolkit'; +import { cleanUsername, mentionCommand } from '@oldschoolgg/toolkit'; import { UserError } from '@oldschoolgg/toolkit'; import type { GearSetupType, Prisma, User, UserStats, xp_gains_skill_enum } from '@prisma/client'; import { userMention } from 'discord.js'; @@ -221,11 +221,11 @@ export class MUserClass { } get rawUsername() { - return globalClient.users.cache.get(this.id)?.username ?? this.user.username ?? 'Unknown'; + return cleanUsername(this.user.username ?? globalClient.users.cache.get(this.id)?.username ?? 'Unknown'); } get usernameOrMention() { - return this.user.username ?? this.mention; + return this.rawUsername; } get badgedUsername() {