Bandaid for a crash in username saver
This commit is contained in:
parent
900f77aa14
commit
ce80d3d521
1 changed files with 1 additions and 0 deletions
|
@ -12,6 +12,7 @@ export class UsernameSaver extends GlobalPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async updateUsername(user: User) {
|
protected async updateUsername(user: User) {
|
||||||
|
if (!user) return;
|
||||||
const newUsername = `${user.username}#${user.discriminator}`;
|
const newUsername = `${user.username}#${user.discriminator}`;
|
||||||
const latestEntry = await this.usernameHistory.getLastEntry(user.id);
|
const latestEntry = await this.usernameHistory.getLastEntry(user.id);
|
||||||
if (!latestEntry || newUsername !== latestEntry.username) {
|
if (!latestEntry || newUsername !== latestEntry.username) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue