quotes and bug fixes

This commit is contained in:
John Facey
2021-12-03 18:23:25 -06:00
parent 09d2550d92
commit b4b29fbe8f
6 changed files with 55 additions and 5 deletions

12
commands/exit.js Normal file
View File

@@ -0,0 +1,12 @@
var libFlayer = require("../libFlayer.js");
module.exports = {
name: 'exit',
description: 'Exit',
execute(message) {
message.reply(
`!Goodbye world - someone respawn my process`
);
await new Promise(resolve => setTimeout(process.exit(), 5000));
}
};

View File

@@ -4,10 +4,15 @@ module.exports = {
name: 'help',
description: 'Help',
execute(message) {
message.reply('!help - Lists the available commands');
message.reply('**!search** - Searches the RSS Sources: *!search google*');
message.reply('**!get**- Retrieves Search By Index: *!get 25*');
message.reply('**!add** - Add a new RSS Source Feed dynamically: *!add http://www.engadget.com/rss.xml*');
message.reply('**!update** - Updates all current RSS Feeds: *!update*');
message.reply(
`!help - Lists the available commands
**!search** - Searches the RSS Sources: *!search google*
**!get**- Retrieves Search By Index: *!get 25*
**!add** - Add a new RSS Source Feed dynamically: *!add http://www.engadget.com/rss.xml*
**!update** - Updates all current RSS Feeds: *!update*
**!quote** - Selects a random quote: *!update*
**!exit** - Force kills bot: *!exit*
`
);
}
};

12
commands/quotes.js Normal file
View File

@@ -0,0 +1,12 @@
var libFlayer = require("../libFlayer.js");
module.exports = {
name: 'quote',
description: 'Quote!',
execute(message) {
var quotes = libFlayer.getQuotes();
var selectedQuote = Math.floor(Math.random() * quotes.length);
message.reply(quotes[selectedQuote]);
}
};