KitDevguides

KitDev / Guides / Deployment message and updates

Deployment message and updates

When KitDev finishes starting up and the console shows KitDev active, the assistant bot sends to the logs group an animation of the console (the logo, the versions and the loaded plugins) with this text below:

🚀 KitDev has been deployed!

👤 User: your name 🤖 Assistant: @your_bot 🗄 Database: PostgreSQL 17.5 💬 Support: @kitDev_userbot

In the animation only the progress bar moves: it fills up and, once full, a flash of light passes over it again and again. Everything else stays still. It lasts about 17 seconds and repeats from the start, so each loop the bar fills up again.

The Database line says which one you use (SQLite, MongoDB or PostgreSQL) and its version; it is the same one .alive shows and the one in the startup log. Everything goes in a single message, and if there are updates, the button stays below. Support is the userbot's official channel, the same one that signs the footer of every help.

Animation quality

  • With ffmpeg installed an MP4 is sent (H.264, no sound): all the colors, sharp and about 200 KB. Telegram shows it as a GIF.
  • Without ffmpeg a GIF made with Pillow is sent, also large and without dithering, of about 400 KB.
  • If Telegram rejects the animation the next one is tried; then the still image; and if that fails too, just the text. If the assistant is not available, the message is sent with your account, without the assistant line and without buttons.
  • The drawing measures about 1286 × 776 pixels and shows the logo, the versions and the plugins loaded in that startup.

Cache

The animation is saved in data/cache/ and reused on every startup as long as nothing it shows changes: the KitDev version, the Kurigram one, the Python one or the number of loaded plugins. If any changes, it is drawn again and the previous one is deleted; it is also regenerated if the saved file is damaged. Drawing the MP4 takes a few seconds, which is why the cache is useful. data/cache/ is not included in backups.

"Update Available" button

On startup, KitDev runs git fetch to see whether the repository has new commits. If it does, the message carries the Update Available button below it. If there are no changes, no button appears.

  1. Tap the button: the assistant sends a Carbon-style image with the new commits (hash, message, author and how long ago) and the Update now button.
  2. Tap Update now: git pull --ff-only is run and the userbot restarts completely. When it starts again, it sends the deployment message again.

Only you can use the buttons. The image shows up to 12 commits; if there are more, it summarizes them in one line.

When the button doesn't appear

Nothing is shown, without errors, in these cases:

  • The repository is private (or there are no credentials): KitDev never asks for a username or password, it simply can't check. When the repository becomes public it will appear by itself.
  • There is no connection, or the folder is not a git clone, or you are on a detached HEAD.
  • You already have the latest version.

The branch that is checked is the tracking branch of the one you have active (origin/dev if you are on dev). If it has no tracking branch, it uses origin/<your branch>.

When updating

  • requirements.txt changed: before restarting, pip install -r requirements.txt is run with the userbot's same Python. If it fails, the code is already updated but it does not restart, and the error is shown.
  • Rewritten history: if your copy has its own commits and the remote changed its history (for example a commit --amend with force push), git pull --ff-only can't move forward. KitDev tells you and touches nothing; in that case update by hand, for example with git reset --hard origin/<branch> (this discards the local commits).
  • Local changes in files the remote also modifies make the pull fail; the reason is shown.
  • data/ and .env are not touched: they are outside Git.