From 82204dab82cfd8fb93e3b9879aefa6ae614165be Mon Sep 17 00:00:00 2001 From: "jill \"oatmealine\" monoids" Date: Fri, 26 Nov 2021 18:45:54 +0000 Subject: [PATCH] silence --- src/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 5c49905..33ca11d 100644 --- a/src/index.js +++ b/src/index.js @@ -45,7 +45,8 @@ const randomTrendStrings = [ 'the {}', 'GUYS today i accidentaly {}', 'jesus fuckign christ im going to actually fucking {}', - '`{}`. :)' + '`{}`. :)', + 'holy shit lholy shit hHOLY shit HOLY SHIT {}\n\n!!!!!!!!!!!d' ]; async function postInRandomChannel(text) { @@ -62,7 +63,7 @@ async function getTrend() { let t = await got('https://trends24.in/russia/'); const $ = cheerio.load(t.body); const elems = $('.trend-card > .trend-card__list')[0]; - const trends = elems.children.map(n => n.children[0].children[0].data); + const trends = elems.children.map(n => n.children[0].children[0].data).filter(t => !t.startsWith('#')); return trends[Math.floor(Math.random() * trends.length)]; } catch(err) { console.log(err); @@ -87,7 +88,9 @@ function doTrendTimeout() { postRandomTrend(); setTimeout(doTrendTimeout, randomTimeout()); } -setTimeout(doTrendTimeout, randomTimeout()); +// let t = randomTimeout(); +// console.log(t / 1000 + ' Seconds Left.'); +// setTimeout(doTrendTimeout, t); async function checkVoiceChannel(msg) { if (!msg.guild) return;