Skip to content

A Telegram bot that replaces faces with pixels, cats, skull of satoshi or a liotta

Notifications You must be signed in to change notification settings

arbadacarbaYK/Pixelbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pixelbot

A Telegram bot that replaces faces with pixels, skull of satoshi, liotta faces, clowns or random cat-pics and can run via github actions or in a local VM.

Screenshot 2023-12-07 at 13 48 39 Screenshot 2023-12-07 at 13 48 12 Screenshot 2023-12-07 at 13 48 05 photo_2024-05-24_22-47-22 Screenshot 2023-12-07 at 12 48 05 Screenshot 2023-12-07 at 12 48 05 Screenshot 2023-12-07 at 12 48 05 Screenshot 2023-12-07 at 12 48 05

Behaviour in a DM with the bot

  • on first button-press the original pic disappears
  • a keyboard with buttons pops up
  • choose an option to get an obfuscated version
  • press those buttons until happy with the result
  • works with both static images (JPG/PNG) and animated GIFs

Behaviour in groupchats where the bot is added

  • bot does not detect faces or react to pics
  • unless any user replies to a pic with the command /pixel
  • the keyboard with buttons pops up and every user can use them
  • cancel option removes the buttons (and leaves pic untouched)
  • works with both static images and animated GIFs - just reply with /pixel to any media
Screenshot 2024-05-26 at 06 20 45 Screenshot 2024-05-26 at 06 20 57

Installation on a Server

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)
  • Git (optional, for cloning the repository)

Steps to Install

  1. Clone the repository or download the source code:

    git clone https://github.com/arbadacarbayk/Pixelbot.git
    cd Pixelbot
    
  2. Create a virtual environment (recommended):

    python -m venv venv
    source venv/bin/activate  
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Copy the example-env a create and .env file including your own Telegram bot token

  5. Create required directories:

    mkdir -p processed downloads 
    
  6. Run the bot:

    python pixelateTG.py
    

Running as a Service (Linux)

To keep the bot running after you close the terminal, you can set it up as a systemd service:

  1. Create a service file:

    sudo nano /etc/systemd/system/pixelbot.service
    
  2. Add the following content (adjust paths as needed):

    [Unit]
    Description=Pixelbot Telegram Bot
    After=network.target
    
    [Service]
    User=yourusername
    WorkingDirectory=/path/to/Pixelbot
    ExecStart=/path/to/Pixelbot/venv/bin/python /path/to/Pixelbot/pixelateTG.py
    Restart=always
    RestartSec=10
    
    [Install]
    WantedBy=multi-user.target
    
  3. Enable and start the service:

    sudo systemctl enable pixelbot
    sudo systemctl start pixelbot
    
  4. Check status:

    sudo systemctl status pixelbot
    
Screenshot 2023-12-05 at 20 18 28

It will then self-build up all dependencies given in requirements.txt and run the bot :) Enjoy.

Screenshot 2023-12-05 at 20 18 36 Screenshot 2023-12-05 at 20 18 47

To Do

  • catch more faces
  • support more input formats
  • moooooaaar masks

⚡️tip me if you like this bot here

About

A Telegram bot that replaces faces with pixels, cats, skull of satoshi or a liotta

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages