v3.1.0
- Added Webhook.listener() to replace Webhook.middleware()
Example
// ...
const webhook = new Webhook('auth')
const app = express()
app.post('/botvote', webhook.listener((vote) => {
console.log(vote.user) // 172075838806818817
}))
// ...
Example
// ...
const webhook = new Webhook('auth')
const app = express()
app.post('/botvote', webhook.listener((vote) => {
console.log(vote.user) // 172075838806818817
}))
// ...