<commit_before>"use strict";

const config = require('../../code/config');
const hooks = require('../../code/hooks');
const package_def = require('../../package');
const Promise = require('promise');
const path = require('path');
const _ = require('underscore');
const s = require("underscore.string");
_.mixin(s.exports());

module.exports = [{
  description: "Every online device/server responds with its name and group",
  name: "list",
  command: "list",
  action: function (message, service, matches) {
    return Promise.resolve(`*${config.get("telegram:device_name_char")}${config.get("device_name")}* of group *${config.get("telegram:device_name_char")}${config.get("device_group")}*`);
  },
  response: true
}, {
  description: "This help",
  name: "help",
  command: "help",
  action: function (message, service, matches) {
    let commands = hooks.get_commands();
    let out_str = `${package_def.name} v${package_def.version}\n${package_def.description}\n\n*Commands:*\n`;
    _.each(commands, function (el) {
      out_str = `${out_str}${_.trim(el.command)} - ${_.clean(el.description)}\n`;
    })
    return Promise.resolve(_.trim(out_str).toString());
  },
  response: true
}, {
  description: "For importing command into BotFather",
  name: "import_commands",
  command: "import_commands",<commit_msg>removed multi device mode because every bot can only be hooked once<commit_after>"use strict";

const config = require('../../code/config');
const hooks = require('../../code/hooks');
const package_def = require('../../package');
const Promise = require('promise');
const path = require('path');
const _ = require('underscore');
const s = require("underscore.string");
_.mixin(s.exports());

module.exports = [{
  description: "This help",
  name: "help",
  command: "help",
  action: function (message, service, matches) {
    let commands = hooks.get_commands();
    let out_str = `${package_def.name} v${package_def.version}\n${package_def.description}\n\nCommands:\n`;
    _.each(commands, function (el) {
      out_str = `${out_str}${_.trim(el.command)} - ${_.clean(el.description)}\n`;
    })
    return Promise.resolve(_.trim(out_str).toString());
  },
  response: true
}, {
  description: "For importing command into BotFather",
  name: "import_commands",
  command: "import_commands",
{'fraction_non_alphanumeric': 0.18917748917748917, 'fraction_numerical': 0.0, 'mean_word_length': 4.72029702970297, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7010183', 'n_tokens_mistral': 713, 'n_tokens_neox': 712, 'n_words': 162}