A powerful, multi-function Telegram bot https://t.me/KowalskiNodeBot
Find a file
2025-04-14 20:11:57 -04:00
.github Pick all depths for checkout 2025-04-11 12:05:58 -03:00
src feat: better error handling and fixed file size checking for /yt 2025-04-14 19:58:36 -04:00
.dockerignore docker/docs: dockerize and add+modify documentation 2025-04-14 20:09:13 -04:00
.gitignore Update gitignore 2025-04-11 11:02:14 -03:00
.gitmodules Added SpamWatch library to source 2024-12-08 19:54:10 -03:00
AUTHORS Update AUTHORS file automatically 2025-04-14 04:57:29 +00:00
CODE_OF_CONDUCT.md Changing the Code of Conduct and the README to apply with the organization 2024-12-08 19:36:50 -03:00
config.env.example Made the bot more generic now 2025-01-10 10:40:18 -03:00
docker-compose.yml docker/docs: dockerize and add+modify documentation 2025-04-14 20:09:13 -04:00
Dockerfile docker/docs: dockerize and add+modify documentation 2025-04-14 20:09:13 -04:00
LICENSE Push base Telegraf bot 2024-07-24 22:39:27 -03:00
nodemon.json Destroying Last.fm command codebase by doing more friendly messages to the user 2024-12-17 13:01:11 -03:00
package.json Bump node-html-parser from 6.1.13 to 7.0.1 (#25) 2024-12-26 20:55:50 -03:00
README.md docs: minor lint/fix 2025-04-14 20:11:57 -04:00

Kowalski (Node.js Telegram Bot)

Contributor Covenant GitHub License

Kowalski is a a simple Telegram bot made in Node.js.

Self-host requirements

  • Node.js 20 or newer (you can also use Bun)
  • A Telegram bot (create one at @BotFather)
  • FFmpeg (only for the /yt command)
  • Docker and Docker Compose (only required for Docker setup)

Run it yourself, develop or contribute with Kowalski

First, clone the repo with Git:

git clone https://github.com/ABOCN/TelegramBot

And now, init the submodules with these commands (this is very important):

cd TelegramBot
git submodule update --init --recursive

Next, inside the repository directory, create a config.env file with some content, which you can see the example .env file to fill info with. To see the meaning of each one, see the Functions section.

After editing the file, save all changes and run the bot with npm start.

Tip

To deal with dependencies, just run npm install or npm i at any moment to install all of them.

Running with Docker

Important

Please complete the above steps to prepare your local copy for building. You do not need to install FFmpeg on your host system.

You can also run Kowalski using Docker, which simplifies the setup process. Make sure you have Docker and Docker Compose installed.

Using Docker Compose

  1. Make sure to setup your config.env file first!

  2. Run the container

    docker compose up -d
    

Note

The -d flag causes Kowalski to run in the background. If you're just playing around, you may not want to use this flag.

Using Docker Run

If you prefer to use Docker directly, you can use these instructions instead.

  1. Make sure to setup your config.env file first!

  2. Build the image

    docker build -t kowalski .
    
  3. Run the container

    docker run -d --name kowalski --restart unless-stopped -v $(pwd)/config.env:/usr/src/app/config.env:ro kowalski
    

Note

The -d flag causes Kowalski to run in the background. If you're just playing around, you may not want to use this flag.

config.env Functions

  • botSource: Put the link to your bot source code.
  • botToken: Put your bot token that you created at @BotFather.
  • botAdmins: Put the ID of the people responsible for managing the bot. They can use some administrative + exclusive commands on any group.
  • lastKey: Last.fm API key, for use on lastfm.js functions, like see who is listening to what song and etc.
  • weatherKey: Weather.com API key, used for the /weather command.

Note

  • Take care of your config.env file, as it is so much important and needs to be secret (like your passwords), as anyone can do whatever they want to the bot with this token!

About/License

BSD-3-Clause - 2024 Lucas Gabriel (lucmsilva).