// get package
const Rimiter = require('rimiter')
// create a new rate limiter
const rimiter = new Rimiter()
// when an item is rate limited, ban them for 60 seconds
rimiter.on('limited', rimiter.ban)
// limited is whether 'user-1' is now rate limited
const limited = rimiter.limit('user-1')
limited
- ID that has just been limitedbanned
- ID that has just been bannedunbanned
- ID that has just been unbanned