merge-requests/4/head
Matthew 2020-03-28 05:08:37 -04:00
parent 00e76a6b69
commit 449d61fd55
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
2 changed files with 3 additions and 2 deletions

View File

@ -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***`);

View File

@ -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***`);