Hotfix for crash

This commit is contained in:
Dragory 2019-05-03 23:34:44 +03:00
parent e231faf51f
commit a4919523c1

View file

@ -12,6 +12,7 @@ export class UsernameSaver extends GlobalPlugin {
}
protected async updateUsername(user: User) {
if (!user) return;
const newUsername = `${user.username}#${user.discriminator}`;
const latestEntry = await this.usernameHistory.getLastEntry(user.id);
if (newUsername !== latestEntry.username) {