Skip to content
Permalink
Browse files

fix typeerror

  • Loading branch information...
gc committed Aug 10, 2019
1 parent 1bc3725 commit f20c12a4a8735e57896bd52b9dc84e475163e3ea
Showing with 10 additions and 14 deletions.
  1. +10 −14 bot/events/redditPosts.js
@@ -24,13 +24,11 @@ module.exports = class extends Event {
const redditClient = new SnooStorm(new Snoowrap(redditApp));

/* eslint-disable new-cap */
const commentStream = redditClient
.CommentStream({
subreddit: '2007scape',
results: 100,
pollTime: 10000
})
.catch(() => null);
const commentStream = redditClient.CommentStream({
subreddit: '2007scape',
results: 100,
pollTime: 10000
});

commentStream.on('comment', comment => {
if (!jmodAccounts.includes(comment.author.name.toLowerCase())) return;
@@ -43,13 +41,11 @@ module.exports = class extends Event {
});
});

const submissionStream = redditClient
.SubmissionStream({
subreddit: '2007scape',
results: 50,
pollTime: 10000
})
.catch(() => null);
const submissionStream = redditClient.SubmissionStream({
subreddit: '2007scape',
results: 50,
pollTime: 10000
});

submissionStream.on('submission', post => {
if (!jmodAccounts.includes(post.author.name.toLowerCase())) return;

0 comments on commit f20c12a

Please sign in to comment.
You can’t perform that action at this time.