feat: update modlogs usernames

pull/15/head
Hiroyuki 2021-09-12 22:17:42 -04:00
parent e826e464c9
commit 669d9d0fef
No known key found for this signature in database
GPG Key ID: AF65958B7B7362E6
1 changed files with 1 additions and 0 deletions

View File

@ -57,6 +57,7 @@ export default class Usermod extends Command {
username: value, username: value,
homepath: `/home/${value}`, homepath: `/home/${value}`,
}); });
await this.client.db.Moderation.updateMany({ username: account.username }, { username: value });
await this.client.commands.get('notify') await this.client.commands.get('notify')
.run(message, [value, ...`Your username has been successfully changed. Remember to use \`ssh ${value}@cloud.libraryofcode.org\` when logging in.`.split(' ')]); .run(message, [value, ...`Your username has been successfully changed. Remember to use \`ssh ${value}@cloud.libraryofcode.org\` when logging in.`.split(' ')]);
} catch (error) { } catch (error) {