Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gaia-js-telegram-bot-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gaia-js-telegram-bot-api - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

27

lib/commands.js

@@ -37,3 +37,3 @@ module.exports = function(bot, mcp) {

// Matches "/devices"
// Matches "/device"
bot.onText(/\/device/, function (msg, match) {

@@ -60,2 +60,24 @@ var chatId = msg.chat.id;

// Matches "/controller"
bot.onText(/\/controller/, function (msg, match) {
var chatId = msg.chat.id;
if(!mcp.started) {
bot.sendMessage(chatId, 'Sorry Gaia is stoped... \n /start it first for controller access');
return;
}
var message = '';
// Search in all controllers
for (var i = 0; i < mcp.controllers.length; i++) {
message += '-- ' + mcp.controllers[i].name + ' --' + '\n \n';
var attributes = mcp.controllers[i].getAttributes();
for (var key in attributes){
message += key + ': ' + attributes[key] + '\n';
}
}
bot.sendMessage(chatId, message);
});
// Matches "/help"

@@ -78,4 +100,7 @@ bot.onText(/\/help/, function (msg, match) {

//Controller
message += '/controller - Get a lis of the current controllers and attributes. \n';
bot.sendMessage(chatId, message);
});
};

2

package.json
{
"name": "gaia-js-telegram-bot-api",
"description": "Node-telegram-bot-api interface for gaia-js",
"version": "0.0.1",
"version": "0.0.2",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc