From 604c71c02e54d76dc621b0ce09062eab1bc11b98 Mon Sep 17 00:00:00 2001 From: zakt0210 Date: Wed, 6 Dec 2017 13:36:26 -0500 Subject: [PATCH] Fruit --- assets/json/fruit.json | 104 +++++++++++++++++++++++++++++++++++++++ commands/random/fruit.js | 17 +++++++ 2 files changed, 121 insertions(+) create mode 100644 assets/json/fruit.json create mode 100644 commands/random/fruit.js diff --git a/assets/json/fruit.json b/assets/json/fruit.json new file mode 100644 index 00000000..e1ce786b --- /dev/null +++ b/assets/json/fruit.json @@ -0,0 +1,104 @@ +[ + "Apple", + "Apricot", + "Avacado", + "Banana", + "Bilberry", + "Blackberry", + "Blackcurrant", + "Blueberry", + "Boysenberry", + "Crab Apples", + "Currant", + "Cherry", + "Cherimoya", + "Chico Fruit", + "Cloudberry", + "Coconut", + "Cranberry", + "Cucumber", + "Custard apple", + "Damson", + "Date", + "Dragonfruit", + "Durian", + "Elderberry", + "Feijoa", + "Fig", + "Goji berry", + "Gooseberry", + "Grape", + "Raisin", + "Grapefruit", + "Guava", + "Honeyberry", + "Huckleberry", + "Jabuticaba", + "Jackfruit", + "Jambul", + "Jujube", + "Juniper berry", + "Kiwano", + "Kiwifruit", + "Kumquat", + "Lemon", + "Lime", + "Loquat", + "Longan", + "Lychee", + "Mango", + "Mangosteen", + "Marionberry", + "Melon", + "Cantaloupe", + "Honeydew", + "Watermelon", + "Miracle fruit", + "Mulberry", + "Nectarine", + "Nance", + "Olive", + "Orange", + "Blood orange", + "Clementine", + "Mandarine", + "Tangerine", + "Papaya", + "Passionfruit", + "Peach", + "Pear", + "Persimmon", + "Plantain", + "Plum", + "Prune (dried plum)", + "Pineapple", + "Plumcot (or Pluot)", + "Pomegranate", + "Pomelo", + "Purple mangosteen", + "Quince", + "Raspberry", + "Salmonberry", + "Rambutan", + "Redcurrant", + "Salal berry", + "Salak", + "Satsuma", + "Soursop", + "Star fruit", + "Solanum quitoense", + "Strawberry", + "Tamarillo", + "Tamarind", + "Ugli fruit", + "Yuzu", + "Chili Pepper", + "Corn Kernel", + "Eggplant", + "Pea", + "Squash", + "Sunflower Seed", + "Tomato", + "Pant", + "Delta's Mystery Fruit" +] diff --git a/commands/random/fruit.js b/commands/random/fruit.js new file mode 100644 index 00000000..59867c0f --- /dev/null +++ b/commands/random/fruit.js @@ -0,0 +1,17 @@ +const { Command } = require('discord.js-commando'); +const fruits = require('../../assets/json/fruit'); + +module.exports = class FruitCommand extends Command { + constructor(client) { + super(client, { + name: 'fruit', + group: 'random', + memberName: 'fruit', + description: 'Responds with a random fruit.' + }); + } + + run(msg) { + return msg.say(fruits[Math.floor(Math.random() * fruits.length)]); + } +};