Jslint (#14)
* linting, rolling dice now calculates the sum of each shown value. * package update
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const globals = require('../globals')
|
||||
const Discord = require('discord.js')
|
||||
const db = globals.db
|
||||
const globals = require('../globals');
|
||||
const Discord = require('discord.js');
|
||||
const db = globals.db;
|
||||
|
||||
module.exports = {
|
||||
name: 'show',
|
||||
@ -15,18 +15,18 @@ 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 gender
|
||||
if (docs[0].character.sex == 'female') { gender = '♀️' }
|
||||
else { gender = '♂️' }
|
||||
const Reply = new Discord.MessageEmbed()
|
||||
Reply.setColor('#0099ff')
|
||||
Reply.setTitle(gender + ' ' + docs[0].character.name)
|
||||
Reply.setDescription(docs[0].character.age + ' Jahre, ' + docs[0].character.race + '/' + docs[0].character.culture)
|
||||
Reply.addField(docs[0].character.professionname, docs[0].character.xp.startinglevel)
|
||||
let gender;
|
||||
if (docs[0].character.sex == 'female') { gender = '♀️'; }
|
||||
else { gender = '♂️'; }
|
||||
const Reply = new Discord.MessageEmbed();
|
||||
Reply.setColor('#0099ff');
|
||||
Reply.setTitle(gender + ' ' + docs[0].character.name);
|
||||
Reply.setDescription(docs[0].character.age + ' Jahre, ' + docs[0].character.race + '/' + docs[0].character.culture);
|
||||
Reply.addField(docs[0].character.professionname, docs[0].character.xp.startinglevel);
|
||||
|
||||
message.reply( Reply );
|
||||
}
|
||||
|
Reference in New Issue
Block a user