2.0.5 • Published 10 years ago

vapor-friendslist v2.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

NPM version

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

limit (optional)

Friends list limit. Default value: 100

welcomeMessage (optional)

Welcome message text. Default value: undefined

welcomeMessageDelay (optional)

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.

readFile / writeFile

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.

2.0.5

10 years ago

2.0.4

10 years ago

2.0.3

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago