random and feed saving started

This commit is contained in:
John Facey
2021-12-13 17:38:47 -06:00
parent 164fdea08a
commit 5c91571300
7 changed files with 130 additions and 7 deletions

16
commands/random.js Normal file
View File

@@ -0,0 +1,16 @@
var libFlayer = require("../libFlayer.js");
module.exports = {
name: 'random',
description: 'Random',
async execute(message) {
message.reply(
`Selecting a random article...`
);
var i = Math.floor(Math.random() * (max - min + 1) + min );
var feedArray = libFlayer.getFeeds();
message.reply(`Retrieving: [Link](${feedArray[i].link})`);
}
};