Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. async function processEvents({ body }, res) {
  2.     if (body.type === 'confirmation') {
  3.         res.send(config.group_secret);
  4.  
  5.         return console.log('Server sended confirmation');
  6.     }
  7.  
  8.     res.send('ok');
  9.  
  10.     /* Stop action for other events */
  11.     if (body.type !== 'message_new') {
  12.         return;
  13.     }
  14.  
  15.     /* ... my code */
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement