README
Vapor Friends List Plugin
Vapor plugin to manage friends list automatically.
Features
- Accepts friend requests.
- Removes the oldest friend if the friends list becomes full.
- Sends welcome message.
- Provides custom events for other plugins to listen to.
- Admins are protected from being auto-removed
Installation
npm install vapor-friendslist
Usage
var friendslist = require('vapor-friendslist');
// Instantiate Vapor etc.
vapor.use(friendslist);
// or
vapor.use(friendslist, {
limit: 100,
welcomeMessage: 'Hello! Thanks for adding me.',
welcomeMessageDelay: 3000
});
Configuration
(optional) limit
Friends list limit. Default value: 100
(optional) welcomeMessage
Welcome message text. Default value: undefined
(optional) welcomeMessageDelay
Welcome message delay in milliseconds. Default value: 3000
(3 seconds).
Events
message:*
message
- A message string.
Standard Vapor message events to be used with logger.
/ readFilewriteFile
Standard Vapor file events - readFile
/ writeFile
.
friendAccepted
- steamID - user's SteamID64 as string
Friend request has been accepted.
friendRemoved
- steamID - user's SteamID64 as string
Friend has been removed from friends list because the limit has been reached.
License
MIT. See LICENSE
.