quotes and bug fixes
This commit is contained in:
12
commands/exit.js
Normal file
12
commands/exit.js
Normal 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));
|
||||
}
|
||||
};
|
||||
@@ -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
12
commands/quotes.js
Normal 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]);
|
||||
|
||||
}
|
||||
};
|
||||
1
index.js
1
index.js
@@ -1,5 +1,6 @@
|
||||
const fs = require('fs');
|
||||
const { prefix, token } = require('./config.json');
|
||||
const { quotes } = require('./quotes.json');
|
||||
const Discord = require('discord.js');
|
||||
const client = new Discord.Client();
|
||||
client.commands = new Discord.Collection();
|
||||
|
||||
@@ -5,6 +5,8 @@ let feeds = require('./feeds.json');
|
||||
|
||||
let linkFlayerMap = [];
|
||||
|
||||
const { quotes } = require('./quotes.json');
|
||||
|
||||
exports.addSource = function(title,source){
|
||||
var linkData = {
|
||||
title: `${title}`,
|
||||
@@ -46,3 +48,7 @@ exports.getSources = function () {
|
||||
return feeds;
|
||||
|
||||
}
|
||||
|
||||
exports.getQuotes = function () {
|
||||
return quotes;
|
||||
}
|
||||
14
quotes.json
Normal file
14
quotes.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"quotes": [
|
||||
"You're Breathtaking - Keanu Reeves",
|
||||
"I cannot be caged. I cannot be controlled. Undersand this as you die, ever pathetic ever fools",
|
||||
"It's dangerous to go alone! Take this.",
|
||||
"I'm not crying, you're crying",
|
||||
"A Code Must Be Determined By The Individual... This Is What I've Decided. - Sekiro",
|
||||
"Every thought is a seed.",
|
||||
"Experience is the name everyone gives to their mistakes.",
|
||||
" In order to be irreplaceable, one must always be different” – Coco Chanel",
|
||||
"The Measure Of An Individual Can Be Difficult To Discern By Actions Alone."
|
||||
]
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user