From 8373194feb1dfd36737ffeca4828888420a6ff5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20H?= Date: Wed, 22 Apr 2020 17:53:12 +0200 Subject: [PATCH] do not hardcode 8ball responses --- assets/json/8ball.json | 14 ++++++++++++++ commands/8ball.js | 13 +------------ 2 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 assets/json/8ball.json diff --git a/assets/json/8ball.json b/assets/json/8ball.json new file mode 100644 index 0000000..0590ca3 --- /dev/null +++ b/assets/json/8ball.json @@ -0,0 +1,14 @@ +{ + "responses": [ + "No darndested clue.", + "¯\\_(ツ)_/¯", + "Stupid question. You should be ashamed of yourself for even asking.", + "Yes!", + "Not in your wildest dreams!", + "No chance.", + "Never.", + "Possibly.", + "There\"s a high chance.", + "I\"d rather not say." + ] +} \ No newline at end of file diff --git a/commands/8ball.js b/commands/8ball.js index 869c627..0608457 100644 --- a/commands/8ball.js +++ b/commands/8ball.js @@ -17,19 +17,8 @@ exports.help = { parameters: '`question` - the question you want to ask' } +const responses = require('../assets/json/8ball.json').responses exports.run = async (client, message, args, level, data) => { // Finish later - const responses = [ - 'No darndested clue.', - '¯\\_(ツ)_/¯', - 'Stupid question. You should be ashamed of yourself for even asking.', - 'Yes!', - 'Not in your wildest dreams!', - 'No chance.', - 'Never.', - 'Possibly.', - 'There\'s a high chance.', - 'I\'d rather not say.' - ] }