Jslint (#14)
* linting, rolling dice now calculates the sum of each shown value. * package update
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
const globals = require('../globals')
|
||||
const db = globals.db
|
||||
const globals = require('../globals');
|
||||
const db = globals.db;
|
||||
module.exports = {
|
||||
name: 'skill',
|
||||
description: 'Zeigt dir deinen Fertigkeitswert im jeweiligen Talent.',
|
||||
@ -12,12 +12,12 @@ module.exports = {
|
||||
db.find({
|
||||
user: message.author.tag,
|
||||
}, function(err, docs) {
|
||||
if (!docs.length > 0) {
|
||||
if (docs.length === 0) {
|
||||
return message.reply(globals.Replies.find(r => r.id === 'NOENTRY').string);
|
||||
}
|
||||
else {
|
||||
let level = 0;
|
||||
for (i in docs[0].character.skills) {
|
||||
for (let i in docs[0].character.skills) {
|
||||
if (docs[0].character.skills[i].id == args[0]) level = docs[0].character.skills[i].level;
|
||||
}
|
||||
message.reply('Du hast folgenden Talentwert in ' + args[0] + ': ' + level);
|
||||
|
Reference in New Issue
Block a user