1.0.4 • Published 2 years ago

openhab-telegram v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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;
    }
});
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago