fix issue with additem
parent
d6689132a1
commit
9bd98e2ea4
|
@ -33,8 +33,9 @@ export default class AddItem extends Command {
|
|||
},
|
||||
});
|
||||
await newAccount.save();
|
||||
}
|
||||
} else {
|
||||
await account.updateOne({ $addToSet: { 'additional.operatingSystems': args[0].split('-')[1] } });
|
||||
}
|
||||
return message.channel.createMessage(`***${this.client.util.emojis.SUCCESS} Added OS code ${args[0]} to profile.***`);
|
||||
}
|
||||
if (args[0].split('-')[0] === 'lang' && ['js', 'py', 'rb', 'ts', 'rs', 'go', 'cfam', 'csharp', 'swift', 'java', 'kt', 'asm'].includes(args[0].split('-')[1])) {
|
||||
|
@ -48,8 +49,9 @@ export default class AddItem extends Command {
|
|||
},
|
||||
});
|
||||
await newAccount.save();
|
||||
}
|
||||
} else {
|
||||
await account.updateOne({ $addToSet: { 'additional.langs': args[0].split('-')[1] } });
|
||||
}
|
||||
return message.channel.createMessage(`***${this.client.util.emojis.SUCCESS} Added language code ${args[0]} to profile.***`);
|
||||
}
|
||||
return message.channel.createMessage(`***${this.client.util.emojis.ERROR} Invalid data code.***`);
|
||||
|
|
Loading…
Reference in New Issue