Fixed the problem with the hp overwrite

This commit is contained in:
ION606
2022-05-30 20:37:15 +03:00
parent 65f4de28ed
commit 5edae8d097
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -117,14 +117,14 @@ function acceptIsValid(bot, other_discord, message, msg, tag_len) {
function hpmp(message, command, dbo) {
throw 'THIS HAS NOT BEEN UPDATED WITH THE MOST RECENT VERSION OF THE MONGODB STRUCTURE!';
// throw 'THIS HAS NOT BEEN UPDATED WITH THE MOST RECENT VERSION OF THE MONGODB STRUCTURE!';
if (command == 'hp') {
dbo.find({"hp": {$exists: true}}).toArray(function(err, doc) {
return message.reply(`You have ${String(doc[0].hp)} hp left!`);
return message.reply(`You have ${String(doc[0].hpmp.hp)} hp left!`);
});
} else if (command == 'mp') {
dbo.find({"mp": {$exists: true}}).toArray(function(err, doc) {
return message.reply(`You have ${String(doc[0].hp)} mp left!`);
return message.reply(`You have ${String(doc[0].hpmp.hp)} mp left!`);
});
}
}