This repo contains an example of using tensorflow model together with Telegram Bots to analyze messages from users.
You need to have node.js v16+ installed.
Here is the instruction how to install it.
Here is the way you can check your node version by using any shell:
> node -v
v16.13.0
- Clone the repository:
git clone git@github.com:DrSmile444/tensorflow-ml-bot-example.git
- Install
node_modules
modules:
npm install
- Get bot token from bot father.
- Create a copy of
.env.example
and name it.env
. - Insert bot token into
BOT_TOKEN
in.env
.
To run the bot, you need to execute the following command:
npm start
This project contains several branches with different stages of the bot:
- main - basic bot setup without tensorflow logic
- feature/tensorflow - complete bot setup with tensorflow
- Node.js v16 - is a JavaScript runtime built on Chrome's V8 JavaScript engine.
- TypeScript - is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.
- Grammy - makes creating Telegram bots so simple you already know how to do it.
- ESLint - statically analyzes your code to quickly find problems. It is built into most text editors and you can run ESLint as part of your continuous integration pipeline.
- Prettier - is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
Here you can find a suggested code editors list
WebStorm has built-in ESLint plugin support, so you need only enable it. The course lectors will use this IDE.
VS Code includes built-in JavaScript IntelliSense, debugging, formatting, code navigation, refactorings, and many other advanced language features. To enable ESLint, you need to install ESLint plugin.
This repo contains VS Code suggested plugins, so you can install them in several clicks.