Skip to content

Commit

Permalink
User mention/username changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Jul 13, 2024
1 parent 100e60f commit 57a20ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/MUser.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 57a20ca

Please sign in to comment.