silence
This commit is contained in:
parent
504fd57b8e
commit
82204dab82
|
@ -45,7 +45,8 @@ const randomTrendStrings = [
|
||||||
'the {}',
|
'the {}',
|
||||||
'GUYS today i accidentaly {}',
|
'GUYS today i accidentaly {}',
|
||||||
'jesus fuckign christ im going to actually fucking {}',
|
'jesus fuckign christ im going to actually fucking {}',
|
||||||
'`{}`. :)'
|
'`{}`. :)',
|
||||||
|
'holy shit lholy shit hHOLY shit HOLY SHIT {}\n\n!!!!!!!!!!!d'
|
||||||
];
|
];
|
||||||
|
|
||||||
async function postInRandomChannel(text) {
|
async function postInRandomChannel(text) {
|
||||||
|
@ -62,7 +63,7 @@ async function getTrend() {
|
||||||
let t = await got('https://trends24.in/russia/');
|
let t = await got('https://trends24.in/russia/');
|
||||||
const $ = cheerio.load(t.body);
|
const $ = cheerio.load(t.body);
|
||||||
const elems = $('.trend-card > .trend-card__list')[0];
|
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)];
|
return trends[Math.floor(Math.random() * trends.length)];
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
@ -87,7 +88,9 @@ function doTrendTimeout() {
|
||||||
postRandomTrend();
|
postRandomTrend();
|
||||||
setTimeout(doTrendTimeout, randomTimeout());
|
setTimeout(doTrendTimeout, randomTimeout());
|
||||||
}
|
}
|
||||||
setTimeout(doTrendTimeout, randomTimeout());
|
// let t = randomTimeout();
|
||||||
|
// console.log(t / 1000 + ' Seconds Left.');
|
||||||
|
// setTimeout(doTrendTimeout, t);
|
||||||
|
|
||||||
async function checkVoiceChannel(msg) {
|
async function checkVoiceChannel(msg) {
|
||||||
if (!msg.guild) return;
|
if (!msg.guild) return;
|
||||||
|
|
Reference in New Issue