updating for readme.md
This commit is contained in:
49
README.md
49
README.md
@@ -2,47 +2,26 @@
|
||||
|
||||
**Discord RSS News Bot**
|
||||
|
||||
Link Flayer is a Discord Bot designed to provide your Discord server with news.
|
||||
Link Flayer is a Discord Bot designed to provide your Discord server with RSS Newsfeeds Instant Web Searches and more.
|
||||
|
||||
## Setup
|
||||
|
||||
- *npm install link-flayer* or *git clone https://github.com/johnfacey/link-flayer.git*
|
||||
- If installing the npm or source *npm install link-flayer* or *git clone https://github.com/johnfacey/link-flayer.git*
|
||||
- Add your token from Discord Bot Interface to the *config.json* [https://discord.com/developers/applications/]
|
||||
<pre>
|
||||
Example: config.json
|
||||
{
|
||||
"prefix": "!",
|
||||
"token": "{Your Discord Bot Token Here}"
|
||||
}
|
||||
</pre>
|
||||
- Setup has been moved from config file to environment variables to assume bot runs from one instance
|
||||
|
||||
## Configure your feeds.json:
|
||||
Each node with a "title" and "link" attribute.
|
||||
Each node with a "title", "link", category attribute to be used from an Airtable.
|
||||
Setting up Airtable for multiple Discord severs still in progress.
|
||||
It should be assumed every server will need its own Airtable Base and the coresponding apiKey, base and table name.
|
||||
|
||||
<pre>
|
||||
Example: feeds.json
|
||||
[
|
||||
{
|
||||
"title": "CNN Top Stories",
|
||||
"link": "http://rss.cnn.com/rss/cnn_topstories.rss"
|
||||
},
|
||||
{
|
||||
"title": "Reddit Front Page",
|
||||
"link": "http://www.reddit.com/.rss"
|
||||
},
|
||||
{
|
||||
"title": "Arstechnica",
|
||||
"link": "http://feeds.arstechnica.com/arstechnica/index"
|
||||
}
|
||||
|
||||
]
|
||||
</pre>
|
||||

|
||||
|
||||
## Usage
|
||||
|
||||
- *npm run start* or *node index.js*
|
||||
|
||||
|
||||
- If using the bot running already from its instance this setup will come later with multiple server profiles. Refer to the above for authorizing a bot to your server.
|
||||
- Running from source *npm run start* or *node index.js*
|
||||
- Can be added to any discord server with admin access and this oAuth link https://discord.com/api/oauth2/authorize?client_id=820809725398089779&permissions=2048&scope=bot
|
||||
|
||||
## Available Commands
|
||||
|
||||
@@ -56,3 +35,11 @@ Example: feeds.json
|
||||
|
||||
* **!update** - Updates all current RSS Feeds: *!update*
|
||||
|
||||
* **!quote** - Selects a random quote: *!quote*
|
||||
|
||||
* **!random** - Selects a random article: *!random*
|
||||
|
||||
* **!random category** - Selects a random article by category: *!random sports*
|
||||
|
||||
* **!answer** - Instant Live Search: *!answer salesforce*
|
||||
|
||||
|
||||
BIN
assets/airtable.png
Normal file
BIN
assets/airtable.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
@@ -8,7 +8,7 @@ module.exports = {
|
||||
var sourceArray = libFlayer.getSources();
|
||||
var sourceString = "";
|
||||
sourceArray.forEach(source => {
|
||||
sourceString +=`[${source.title}](${source.link}) `;
|
||||
sourceString +=`[${source.title}](${source.link}) \n`;
|
||||
});
|
||||
message.reply(sourceString);
|
||||
|
||||
|
||||
2
index.js
2
index.js
@@ -12,7 +12,7 @@ const server = express();
|
||||
var libFlayer = require("./libFlayer.js");
|
||||
|
||||
server.all("/",(req, res) => {
|
||||
var htmlOutput = `"Bot is Ready - Sources loading <br />"`;
|
||||
var htmlOutput = "Bot is Ready - Sources loading <br />";
|
||||
|
||||
var sources = libFlayer.getSources();
|
||||
sources.forEach(source => {
|
||||
|
||||
Reference in New Issue
Block a user