diff --git a/README.md b/README.md index 6f87867..4aaab2a 100644 --- a/README.md +++ b/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/] -
-Example: config.json 
-{
-	"prefix": "!",
-	"token": "{Your Discord Bot Token Here}"
-}
-
+- 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. -
-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"
-    }
-    
-]
-
+![Airtable](./assets/airtable.png) ## 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* + diff --git a/assets/airtable.png b/assets/airtable.png new file mode 100644 index 0000000..85a90d1 Binary files /dev/null and b/assets/airtable.png differ diff --git a/commands/sources.js b/commands/sources.js index 111f0bb..9031442 100644 --- a/commands/sources.js +++ b/commands/sources.js @@ -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); diff --git a/index.js b/index.js index f79a903..75a21ba 100644 --- a/index.js +++ b/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
"`; + var htmlOutput = "Bot is Ready - Sources loading
"; var sources = libFlayer.getSources(); sources.forEach(source => {