MMM TelegramBot implementation - MMRIZE/MMM-CalendarExt3 GitHub Wiki

Add these codes to your MMM-TelegramBot configuration

customCommands: [
  {
    command: 'cx3_prev',
    description: '[CX3] Glance previous step',
    callback: (commandj, handler, self) => {
      self.sendNotification('CX3_GLANCE_CALENDAR', {step: -1})
      handler.reply('TEXT', 'PREV 1 step ')
    }
  },
  {
    command: 'cx3_next',
    description: '[CX3] Glance next step',
    callback: (commandj, handler, self) => {
      self.sendNotification('CX3_GLANCE_CALENDAR', {step: 1})
      handler.reply('TEXT', 'NEXT 1 step')
    }
  },
  {
    command: 'cx3_set',
    description: '[CX3] Glance specific date: e.g) /cx3_set 2023-12-25',
    callback: (commandj, handler, self) => {
      self.sendNotification('CX3_SET_DATE', {date: handler.args})
      handler.reply('TEXT', 'SET to ' + handler.args)
    }
  },
  {
    command: 'cx3_reset',
    description: '[CX3] Return to default instantly'
    callback: (commandj, handler, self) => {
      self.sendNotification('CX3_RESET_DATE')
      handler.reply('TEXT', 'RESET')
    }
  }
],