From 811e90fcde412716b90a9dd1eaf70d49a22d744b Mon Sep 17 00:00:00 2001 From: Hri7566 Date: Wed, 12 May 2021 13:56:18 +0000 Subject: [PATCH] tree command --- src/Commands.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Commands.js b/src/Commands.js index 11dc1f4..cdd4b02 100644 --- a/src/Commands.js +++ b/src/Commands.js @@ -809,4 +809,16 @@ module.exports = (bot) => { } }); }, false); + + bot.addCommand(['tree', 'fruit', 'fruits'], 0, msg => { + db.getLocation(msg.p._id, location => { + if(location === "outside") { + db.getFruits(function(num_fruits) { + sendChat("Friend "+msg.p.name+": " + num_fruits + "."); + }); + } else { + sendChat(rando("You can't even see it from "+location+", let alone any fruit that may theoretically have grown on it.", "", "You don't see a tree "+location+".", "None in sight.")); + } + }); + }, false); }