openhab-telegram

1.0.4 • Public • Published

openhab-telegram

Usage examples

const telegram = require('openhab-telegram');


const bot = telegram.bot("telegram:telegramBot:uuid");

bot
.onCommand('info', function(t) {
    return '/test Test command';
})
.onCommand('test', function(t) {
    return 'Say something';
});
const telegram = require('openhab-telegram');


const bot = telegram.bot("telegram:telegramBot:uuid");

bot
.ask('Are you sure?', {
    'No': function(b) {
        return true;
    },
    'Yes': function(b) {
        b.ask('Please, confirm', {
            'Yes!': function(b) {
                return 'ГУД!';
            },
            'No!': function(b) {
                return 'Не кіпішуй';
            },
            'Help': function(b) {
                b.message('Something about');
                return true;
            }
        });


        return true;
    }
});

Readme

Keywords

Package Sidebar

Install

npm i openhab-telegram

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

4.98 kB

Total Files

3

Last publish

Collaborators

  • standov