Advertisement
Guest User

Untitled

a guest
Feb 13th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. var Telegram = require('telegram-node-bot');
  2.  
  3. class StartController extends Telegram.TelegramBaseController {
  4.  
  5. startHandler($){
  6. $.runMenu({
  7. message: "Good and bright day.\n" + "Im your virtual receptionist and I can help you during your arrival and stay at the hotel. \n" + "To bring you a properly assistance tell me if you have allready a stay in a Hotel: " ,
  8. options: {
  9. parse_mode: 'Markdown' // in options field you can pass some additional data, like parse_mode
  10. },
  11. 'Yes, I have a place': {
  12. resizeKeyboard: true,
  13.  
  14.  
  15.  
  16. },
  17. 'Not at the moment': {
  18. message: 'Can I help you to find one?',
  19. resizeKeyboard: true,
  20. 'yes': () => {
  21.  
  22. },
  23. 'no': () => {
  24.  
  25. }
  26.  
  27. },
  28.  
  29.  
  30. 'anyMatch': () => { //will be executed at any other message
  31.  
  32. }
  33. })
  34. }
  35.  
  36.  
  37. get routes(){
  38. return {
  39. 'startCommand' : 'startHandler'
  40. };
  41. }
  42. }
  43.  
  44.  
  45.  
  46.  
  47. module.exports = StartController;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement