1
0
Fork 0

fix: usermod account unlock logic

master
Hiroyuki 2021-09-12 22:07:12 -04:00
parent d4c740206d
commit 69fe6256fa
No known key found for this signature in database
GPG Key ID: AF65958B7B7362E6
1 changed files with 2 additions and 4 deletions

View File

@ -65,10 +65,8 @@ export default class Usermod extends Command {
await this.client.util.handleError(error);
return this.error(message.channel, 'Failed to modify username. Please check <#595788220764127272> for more information.');
} finally {
if (account.locked) {
await this.client.util.exec(`unlock ${account.username}`);
await account.updateOne({ locked: false });
}
await this.client.util.exec(`unlock ${account.username}`);
await account.updateOne({ locked: false });
}
modifyingPropertyResponse.delete();