Permalink
Browse files

Fixed +reddit command

  • Loading branch information...
Alcha committed Sep 30, 2018
1 parent 071e68d commit 0a430de6a4aacb4d3f58d2305e6bee0c02f0d6d0
Showing with 2 additions and 2 deletions.
  1. +2 −2 cmds/features/Reddit.js
@@ -67,8 +67,8 @@ class Reddit extends Command {
subreddit = subreddit.slice(start + 1)
}

return reddit.getRandomPost(subreddit, sort, from, limit).then(post => {
msg.channel.send(post)
return reddit.getRandomHotPost(subreddit, sort, from, limit).then(post => {
Command.sendMessage(msg.channel, post, this.client.user)
}).catch(err => {
if (err.message === 'Cannot read property \'children\' of undefined') {
msg.channel.send('This subreddit does not exist or is private.')

0 comments on commit 0a430de

Please sign in to comment.