Skip to content

Repository files navigation

MissKatyPyro

- I will not give any support to your fork, so try learn by yourself!! Don't contact me because of your fault.

MIT License Repository Size Issue Closed

Readme in Indonesian View Demo Report bug

Table of Contents

[1] About MissKaty

MissKaty is a Telegram Bot built using Python and the Pyrogram library. Many useful features for us to use. I hope that one day this project will be discontinued, someone will continue or develop it again. I gave the name MissKaty because I like cats, a cute animal that likes to be played with and friendly with humans.

[2] Framework Tools And Server That Used To Build This Bot

🌱 KuriGram
🌱 Python 3.13 Support
🌱 MongoDB as Database
🌱 PyKeyboard for Building Pagination
🌱 VS Code
🌱 VPS/Server With Root and Docker Support (Recommended)

[3] Donation and Support

For Indonesian Only and some supported country:
🌱 QRIS

For International Payment:
🌱 Paypal

[4] Notes

If you want help me fixing some error in my bot, you can make pull request to this repo. I'm very glad if you can help me. You can also give support to me for buying server.

[5] Features

FEATURE MY BOT 🌱
Basic Admin Feature (ban, kick, mute, warn, promote, purge, dll) βœ”οΈ
AFK Feature βœ”οΈ
Downloader IG, FB, TikTok, Twitter/X and YT-DLP Support (AVC + AAC output) βœ”οΈ
Instagram/Facebook/TikTok post as slideshow rich message (media, caption, stats, video metadata) βœ”οΈ
YT Search & Quality Picker (resolution, bitrate, codec) βœ”οΈ
MultiLanguage Support (en-US, id-ID, id-JW, ru-RU) βœ”οΈ
NightMode βœ”οΈ
ChatBot based on OpenAI and Google Bard βœ”οΈ
MissKaty Mata βœ”οΈ
Inline Search βœ”οΈ
Sticker Tools βœ”οΈ
PasteBin Tools βœ”οΈ
WebScraper (Pahe, MelongMovie, LK21, Terbit21, Kusonime, etc) βœ”οΈ
IMDB Search With Rich Message & Multi Language Per User βœ”οΈ
GenSS From Media and MediaInfo Generator (Partial Analysis, no full download) βœ”οΈ
And Many More.. βœ”οΈ

[6] Variables

Required Variables

  • BOT_TOKEN: Create a bot using @BotFather, and get the Telegram API token.
  • API_ID: Get this value from telegram.org
  • API_HASH: Get this value from telegram.org
  • DATABASE_URI: mongoDB URI. Get this value from mongoDB.
  • LOG_CHANNEL : A channel to log the activities of bot. Make sure bot is an admin in the channel.

Optional Variables

  • YT_COOKIES : Get YT cookies using https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc?pli=1 and save cookies value on github gist. Copy raw url and fill in this vars.
  • USER_SESSION : Session string for Userbot.
  • SOCMED_COOKIES_FILE : Path to a cookies.txt in Netscape format (same as yt-dlp) used by /igdl and /fbdl for private posts and Facebook engagement counts. One file may hold cookies for both instagram.com and facebook.com. If unset, the bot looks for cookies.txt in the working directory.
  • IG_COOKIES_FILE : Alias of SOCMED_COOKIES_FILE (kept for backwards compatibility).
  • YTDL_COOKIE_FILE : Path to a cookies.txt for yt-dlp; also reused when extracting Facebook videos.
  • DATABASE_NAME: Name of the database in MongoDB
  • PAYDISINI_KEY: Api Key PayDisini
  • PAYDISINI_CHANNEL_ID: Channel ID QRIS paydisini
  • COMMAND_HANDLER: List of handler bot command splitted by space. Ex: . ! > so bot will respond with .cmd or !cmd
  • SUDO: User ID that have access to bot, split by space
  • OPENAI_API: Create personal access token from github, and set as this env. Make sure you have access to Github Model.
  • GOOGLEAI_KEY: Learn how to get api key from this https://ai.google.dev/tutorials/python_quickstart?hl=en.
  • CURRENCY_API: Get API Key from https://app.exchangerate-api.com/sign-up
  • NINE_ROUTER_API_KEY: API key for the 9Router gateway used by /ai and /ask chatbot commands (OpenAI-compatible API). Required for ChatBot plugin.
  • NINE_ROUTER_BASE_URL: 9Router base URL. Default https://9router.yasirweb.eu.org/v1 (optional).
  • NINE_ROUTER_MODEL_AI: Model used by /ai. Default oc/mimo-v2.5-free (optional).
  • NINE_ROUTER_MODEL_ASK: Model used by /ask & guest mode. Default oc/deepseek-v4-flash-free (optional).

[7] Tutorial Deploy (Recommended using Docker/Docker Compose)

Build And Run Using Legacy Method

  • Make sure minimum python version is 3.8 and max python 3.12 to prevent some errors. Check it with this command:
python3 --version
  • Install all dependency that needed bot to run. (need root access, you can skip this if your server didn't have root access but some plugins will not work)
apt update -y & apt install libjpeg-dev zlib1g-dev libwebp-dev python3-pip python3-lxml git wget curl ffmpeg locales tzdata neofetch mediainfo speedtest-cli -y
  • Install requirements.txt, if using python => 3.11, you need use venv when install pip package.
    Python < 3.10
pip3 install -r requirements.txt

Python => 3.11

python3 -m venv nama_venv
source nama_venv/bin/activate
pip3 install -r requirements.txt 
  • Setting your config.env or via environment and dont forget fill all required value.
  • Run Bot
bash start.sh

Build And Run Using Docker

  • Start Docker daemon (Skip if already running):
sudo dockerd
  • Build Docker image:
sudo docker build . -t misskaty
  • Run the image:
sudo docker run misskaty
  • To stop the image:
sudo docker ps
sudo docker stop <pid>

Build And Run The Docker Image Using docker-compose

  • Install docker-compose
sudo apt install docker-compose
  • Build and run Docker image or to view current running image:
sudo docker-compose up
  • After editing files with nano for example (nano start.sh):
sudo docker-compose up --build
  • To stop the running image:
sudo docker ps
sudo docker-compose stop <pid>

[8] Thanks to

  • Thanks To Allah Swt.
  • Thanks To Dan For Pyrogram Library as founder of pyrogram.
  • Thanks To Mayuri For Pyrofork Library as owner of pyrofork library.
  • Thanks To TeamDrivecok and SecretGroup TBK in Telegram.
  • Thanks To The Hamker Cat For WilliamButcher Code.
  • Thanks To Team Yukki For AFK Bot Code.
  • Thanks To Wrench For Some Code.
  • Thanks To AmanoTeam For MultiLanguage Template.
  • And All People Who Help Me In My Life... If your code used in this repo and want to give credit please open issue..

[9] Disclaimer

GNU Affero General Public License 2.0
Licensed under GNU AGPL 2.0. WARNING: Selling The Codes To Other People For Money Is Strictly Prohibited. Or i will stop this project forever.

[10] Changelog

v2.18.0 (2026-09-10)

Built on the Kurigram fork, using its rich-message transport (InputRichMessage) for social-media cards.

Social media β€” slideshow rich message (no Chromium, no browser)

  • /igdl & /instadl: Instagram post/reel as a single rich message. Carousels render inline as <tg-slideshow> (up to 50 media, the rich-message limit) with likes, comments, caption and a collapsible video-metadata block. Extraction is pure HTTP via curl_cffi with Chrome TLS impersonation, reading the page's embedded xig_polaris_media JSON β€” this replaces the dead instaloader / saveig.app route (instaloader now returns 401 from datacenter IPs; saveig.app no longer resolves).
  • /fbdl & /fb: Facebook post/reel/video as a slideshow rich message. Content comes from the page's comet_sections JSON and video from yt-dlp; engagement counts are read from the feedback node (its id is base64 of feedback:<post_id>). facebook.com/share/p/... links are resolved to their canonical URL first.
  • /tiktokdl & /ttdl: TikTok video/photo as a slideshow rich message, sourced from the tikwm.com API β€” TikTok's own CDN URLs are Akamai-blocked for server-side fetch (playAddr and yt-dlp's url return 403 to everyone but the extractor, and Telegram's servers therefore cannot download them).
  • Every one of them answers with ONE message: the status text is edited into the rich card (never a separate caption plus album), with an inline URL button to the original post.
  • Blocking curl_cffi calls are dispatched through asyncio.to_thread, so extraction never stalls the bot's event loop.
  • cookies.txt in Netscape format (same as yt-dlp) is now shared by Instagram and Facebook: path is resolved at runtime, several domains can live in one file, and a stale cookie file degrades gracefully (automatic retry without cookies) instead of crashing the command.

Structure

  • download_upload.py + igdl_plugin.py merged into a single sosmed_tools.py; extractors, card builders, cookie/session handling and formatters moved into misskaty/helper/sosmed_helper.py, leaving the plugin with handlers only.
  • update.py now deletes plugin files left behind by older images (download_upload.py, igdl_plugin.py) and MOD_NOLOAD skips them. Previously both the old and the new module registered the same commands, and the stale (already-broken) handler was the one that answered.

v2.17.0 (2026-08-07)

Built on top of the Kurigram fork (KurimuzonAkuma/pyrogram), which adds rich-message support (InputRichMessage, rich_message on send/edit) and Client.get_file with offset/limit for partial downloads.

Refactor & performance

  • Moved root-level utils.py and web/webserver.py into the misskaty package (helper/, core/) so everything lives under one package.
  • Single shared MongoDB connection (singleton + lazy init) instead of multiple AsyncMongoClient instances; removed circular imports between database and misskaty.
  • Bootstrapping moved to misskaty/core/bootstrap.py; yt-dlp cookies are fetched asynchronously at startup (no more blocking requests.get on import).

IMDb

  • Results are now delivered as rich messages via edit (edit_message_text + rich_message) instead of delete-then-send.
  • Merged duplicated imdbres_id/imdbres_en callbacks into one builder with per-locale labels; fixed hidden-layout fields and mixed-language labels.

Admin

  • Fixed real bugs (contextlib missing import, FloodWait e.x, time_converter returning a Message, wrong locale key) and hardened edge cases (channel replies, deleted accounts, missing from_user).
  • Messages restyled with emoji + separators in all 4 locales.

YT-DLP

  • Progress no longer jumps backwards on merged formats; shows elapsed time, ETA, speed and a monospace progress bar; detects the "Finalizing" phase.
  • Captions use monospace blocks and mention the requester; title whitespace is normalized (no more double line breaks).
  • /ytdown now requires a URL argument or a replied message containing a URL.
  • Video output prefers H.264 (AVC) video + AAC audio (fallback to best available), audio extraction uses AAC.

MediaInfo

  • Partial analysis: only the first/last 8 MiB are downloaded (upload.getFile offset/limit), so 2–4 GB files are analyzed in seconds; falls back to a full download automatically when the partial result is incomplete.

v2.16.1 (previous)

  • Fix: use plain emoji on nightmode button (premium-safe).

Sponsor this project

Used by

Contributors

Languages