mirror of
https://github.com/ION606/selmerBot.git
synced 2026-05-15 05:36:54 +00:00
Fixed the problem with the hp overwrite
This commit is contained in:
+3
-3
@@ -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!`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user