mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Hotfix for crash
This commit is contained in:
parent
e231faf51f
commit
a4919523c1
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 (newUsername !== latestEntry.username) {
|
if (newUsername !== latestEntry.username) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue