forked from engineering/cloudservices
fixes
parent
00e76a6b69
commit
449d61fd55
|
@ -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***`);
|
||||
|
|
|
@ -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***`);
|
||||
|
|
Loading…
Reference in New Issue