type on lock should be 2

merge-requests/1/merge
Matthew 2019-10-26 13:06:18 -04:00
parent 91fc45bf0c
commit 57f5c2a01c
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 4 additions and 3 deletions

View File

@ -20,8 +20,9 @@ export default class Lock extends Command {
if (!account) return message.channel.createMessage(`***${this.client.stores.emojis.error} Cannot find user.***`); if (!account) return message.channel.createMessage(`***${this.client.stores.emojis.error} Cannot find user.***`);
const edit = await message.channel.createMessage(`***${this.client.stores.emojis.loading} Locking account...***`); const edit = await message.channel.createMessage(`***${this.client.stores.emojis.loading} Locking account...***`);
if (account.locked) return edit.edit(`***${this.client.stores.emojis.error} This account is already locked.***`); if (account.locked) return edit.edit(`***${this.client.stores.emojis.error} This account is already locked.***`);
if (account.username === 'matthew') return edit.edit(`***${this.client.stores.emojis.error} Permission denied.***`); if (account.username === 'matthew' || account.root) return edit.edit(`***${this.client.stores.emojis.error} Permission denied.***`);
await this.client.util.exec(`lock ${account.username}`); await this.client.util.exec(`lock ${account.username}`);
await account.update({ locked: true });
const expiry = new Date(); const expiry = new Date();
// @ts-ignore // @ts-ignore
@ -39,7 +40,7 @@ export default class Lock extends Command {
logID: uuid(), logID: uuid(),
moderatorID: message.author.id, moderatorID: message.author.id,
reason: momentMilliseconds ? args.slice(2).join(' ') : args.slice(1).join(' '), reason: momentMilliseconds ? args.slice(2).join(' ') : args.slice(1).join(' '),
type: 3, type: 2,
date: new Date(), date: new Date(),
expiration: { expiration: {
expirationDate: momentMilliseconds ? expiry : null, expirationDate: momentMilliseconds ? expiry : null,
@ -53,7 +54,7 @@ export default class Lock extends Command {
embed.setColor(15158332); embed.setColor(15158332);
embed.addField('User', `${account.username} | <@${account.userID}>`, true); embed.addField('User', `${account.username} | <@${account.userID}>`, true);
embed.addField('Supervisor', `<@${message.author.id}>`, true); embed.addField('Supervisor', `<@${message.author.id}>`, true);
if ((momentMilliseconds ? args.slice(2).join(' ') : args.slice(1).join(' ')).length > 0) embed.addField('Reason', momentMilliseconds ? args.slice(2).join(' ') : args.slice(1).join(' ')); if ((momentMilliseconds ? args.slice(2).join(' ') : args.slice(1).join(' ')).length > 0) embed.addField('Reason', momentMilliseconds ? args.slice(2).join(' ') : args.slice(1).join(' '), true);
embed.setFooter(this.client.user.username, this.client.user.avatarURL); embed.setFooter(this.client.user.username, this.client.user.avatarURL);
embed.setTimestamp(); embed.setTimestamp();
// @ts-ignore // @ts-ignore