Updated documentation

This commit is contained in:
benji7425 2017-01-22 18:50:30 +00:00
parent b1fcc0762b
commit 5f04a8e755
4 changed files with 55 additions and 3 deletions

View File

@ -2,9 +2,18 @@
There is a very basic level of interaction with the bot available via chat commands, all of which are prefixed with an exclamation mark '!'
## User commands
| command | action |
|--------------|-----------------------------------------------------------------------------------------|
| !help | list available commands |
| !subscribe | subscribe to feed notifications, so your username gets tagged when a new link is posted |
| !unsubscribe | unsubscribe from feed notifications |
| !sublist | view list of subscribed users |
## Developer commands
Requires your user ID to be specified in the developers list in config.json
| command | action |
|-------------|----------------------------|
| !logsplease | upload the log file |
| !cacheList | report all the cached URLs |

View File

@ -0,0 +1,31 @@
# Configuration
| parameter | description |
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| feedUrl | the RSS feed to check |
| channelID | report all the cached URLs |
| serverID | id of the server the bot is installed on - require to use subscriptions |
| pollingInterval | interval in ms to check the RSS feed |
| numLinksToCache | number of posted links to cache and check against before posting - turn this up if users post a lot of links in the channel |
| messageDeleteDelay | time in ms to leave response messages before deleting (eg "You have successfully subscribed") |
| youtubeMode | whether or not to convert YouTube links to their short url - recommended if you are pulling links from a YouTube channel feed |
| allowSubscriptions | whether or not to have the bot mention a role when it posts a link |
| subscribersRoleID | the ID of the role to mention when posting a link - you can find this by typing \@role in discord and copying out just the numeric part |
| developers | array of developer IDs - add a new one by putting a comma at the end of the one above and putting the ID in double quotes |
## How to find IDs
- Make sure developer mode is turned on in discord
- User Settings > Appearance > Developer Mode
| id | how to find |
|----------------------------|-----------------------------------------------|
| channelID | right click on the channel > copy ID |
| serverID | right click on the server name > copy ID |
| subscribersRoleID | type \@role in discord, copy the numeric part |
| user ID (to add developer) | right click on user > copy ID |
## Note about subsriptions
For subscriptions to work the bot needs the "Manage roles" permission, and needs to be in a role *higher than* the subscribers role

View File

@ -4,9 +4,11 @@
2. Download the zip from [releases](https://github.com/benji7425/discord-feed-bot/releases) and extract
3. Open a terminal in extracted folder
4. Run `npm install` and wait for it to finish
5. Edit *config.json* to include your RSS feed and channel ID
5. Edit *config.json* to include your RSS feed and channel ID (see configuration page for more info)
6. Create *bot-config.json* to include your bot token:
`{
"token": "abc123blahblahblahyourtokengoeshere"
}`
7. Run `node feed-bot.js`
See configuration page for more detail on configuration options

View File

@ -0,0 +1,10 @@
# Troubleshooting
## Bot can't add users to role
- Make sure the bot's role has the "Manage Roles" permission
- Make sure the bot's role is higher than the subscribers role
## Other stuff
Feel free to contact me at the email on my GitHub profile :)