* linting, rolling dice now calculates the sum of each shown value.

* package update
This commit is contained in:
2021-02-09 17:23:23 +01:00
committed by GitHub
parent 20fb66643e
commit 9c0c365cd5
13 changed files with 201 additions and 202 deletions

View File

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