From 449d61fd5529ed3d6c84caf7b65030261a40c800 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sat, 28 Mar 2020 05:08:37 -0400 Subject: [PATCH] fixes --- src/commands/securesign_account.ts | 4 ++-- src/commands/securesign_createcrt.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/securesign_account.ts b/src/commands/securesign_account.ts index 0ec1efc..26ea3f5 100644 --- a/src/commands/securesign_account.ts +++ b/src/commands/securesign_account.ts @@ -16,10 +16,10 @@ export default class SecureSign_Account extends Command { public async run(message: Message, args: string[]) { try { const user = await this.client.db.Account.findOne({ userID: message.author.id }); - if (!user || (!user.permissions.staff && !(message.channel instanceof PrivateChannel))) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Run this command in your DMs!***`); + if (!user || (!user.permissions.associate && !(message.channel instanceof PrivateChannel))) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Run this command in your DMs!***`); let account: AccountInterface; - if (!args[0] || !user.permissions.staff) account = user; + if (!args[0] || !user.permissions.associate) account = user; else account = await this.client.db.Account.findOne({ $or: [{ userID: args[0] }, { username: args[0] }, { emailAddress: args[0] }] }); if (!account) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Account not found***`); diff --git a/src/commands/securesign_createcrt.ts b/src/commands/securesign_createcrt.ts index 655921b..9b34e0b 100644 --- a/src/commands/securesign_createcrt.ts +++ b/src/commands/securesign_createcrt.ts @@ -15,6 +15,7 @@ export default class SecureSign_Init extends Command { public async run(message: Message, args: string[]) { try { + return; const account = await this.client.db.Account.findOne({ userID: message.author.id }); if (!account) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Account not found***`); if (!account.hash) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Account not initialized***`);