removed console.log beacause it was useless and making errors

This commit is contained in:
loicbersier 2018-09-27 20:37:55 +02:00
parent dffd207c0b
commit 16fa8b9302

View file

@ -22,8 +22,7 @@ module.exports = class redditCommand extends Command {
async run(message, { sub }) { async run(message, { sub }) {
const { body } = await snekfetch.get('https://www.reddit.com/r/' + sub + '.json'); const { body } = await snekfetch.get('https://www.reddit.com/r/' + sub + '.json');
let /* the bodies hit the floor */ i = Math.floor((Math.random() * 10) + 1); let /* the bodies hit the floor */ i = Math.floor((Math.random() * 10) + 1);
console.log(body.data.children[i].data.post_hint) if (!body.data.children[1]) {
if (body.data.dist == '0') {
return message.say('Not a valid subreddit') return message.say('Not a valid subreddit')
} }
while (body.data.children[i].data.post_hint !== 'image') { while (body.data.children[i].data.post_hint !== 'image') {