From 8ecb0ee0d7844da953869dba0e6a9a77954cff35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Sat, 4 May 2019 12:42:21 +0200 Subject: [PATCH] removed "let sub = args.sub" --- commands/fun/reddit.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/commands/fun/reddit.js b/commands/fun/reddit.js index 71e1a4c8..2f33d722 100644 --- a/commands/fun/reddit.js +++ b/commands/fun/reddit.js @@ -23,13 +23,12 @@ class RedditCommand extends Command { } async exec(message, args) { - let sub = args.sub; let i = 0; let a = 0; - if (!sub) + if (!args.sub) return; - fetch('https://www.reddit.com/r/' + sub + '.json?limit=100').then((response) => { + fetch('https://www.reddit.com/r/' + args.sub + '.json?limit=100').then((response) => { return response.json(); }).then((response) => { if (!response.data)