<commit_before>/**
 * Run command:
 * BOT_TOCKEN=your_bot_token node dist/examples/0-echo-bot.js
 *
 * if you change the ts file you must build typescript by run `npn run build`
 */

import TelegramBot from '../src/';

const token = process.env.BOT_TOKEN || process.env.TEST_TOKEN; // run `. config.test.sh` for setting TEST_TOKEN
const bot = new TelegramBot(token, {autoUpdate: true});

bot.onMessage(/^\/test[ ]*$/, async function (msg){
  console.log('new /test command recived');

  await bot.sendMessage({
    chat_id: msg.chat.id,
    text: msg.text
  });

  console.log('sent');
});

console.log('Bot actived, send /test command to the bot.');<commit_msg>feat(example): update message text on test command<commit_after>/**
 * Run command:
 * BOT_TOCKEN=your_bot_token node dist/examples/0-echo-bot.js
 *
 * if you change the ts file you must build typescript by run `npn run build`
 */

import TelegramBot from '../src/';

const token = process.env.BOT_TOKEN || process.env.TEST_TOKEN; // run `. config.test.sh` for setting TEST_TOKEN
const bot = new TelegramBot(token, {autoUpdate: true});

bot.onMessage(/^\/test[ ]*$/, async function (msg){
  console.log('new /test command recived');

  await bot.sendMessage({
    chat_id: msg.chat.id,
    text: 'Command test recived ;)'
  });

  console.log('sent');
});

console.log('Bot actived, send /test command to the bot.');
{'fraction_non_alphanumeric': 0.15384615384615385, 'fraction_numerical': 0.001451378809869376, 'mean_word_length': 3.872791519434629, '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': '6318207', 'n_tokens_mistral': 462, 'n_tokens_neox': 465, 'n_words': 133}