Projects & Experience

A set of entertainment bots for Telegram and Discord built around a shared virtual character, with a separate implementation for each platform. Alongside conversations through an external language model, they support chat games, conversation history, demotivator creation and media-message processing.

Project roles
Python DeveloperChatbot DeveloperBackend DeveloperAI Integration Engineer

Technologies and tools

Pythonaiogramdiscord.pyOpenRouter Chat Completions APIRequestsPillowSeleniumChrome WebDriverwebdriver-managerOpenCVNumPyMoviePyFFmpegJSONRussian and English documentation
  • Built two bots around a shared virtual character: a Telegram bot with aiogram and a Discord bot with discord.py. Replies are generated through OpenRouter Chat Completions; the character, model and prompt templates can be configured. Up to the 100 most recent messages are passed as conversational context.
  • Implemented responses to direct mentions and replies, periodic messages, and reactions. In Discord, unsolicited replies have a 1-in-7 chance and are delayed by 2–5 seconds; message reactions have a 1-in-10 chance. Commands and help menus are in Russian, using the `k` prefix in Telegram and `!` in Discord.
  • Added local JSON message histories stored separately for each platform. Each store retains up to 10,000 records; conversation history is used for reply context and demotivator captions. Telegram also stores photo file IDs and maintains per-chat memory of stickers. The implementation does not synchronize Telegram history with Discord.
  • Created a demotivator generator: users can attach an image to a command or select a previously stored Telegram photo. A language model writes the caption from chat context, then the image is rendered with a frame and typography and returned as PNG. Caption generation reads up to 1,000 recent history records.
  • Implemented a slot-machine economy on both platforms. Each user starts with 100,000 virtual coins; matching three symbols pays 2× to 10× the bet. Telegram also awards a daily bonus of 1,000 coins. Balances are stored in JSON.
  • For Telegram, implemented random-photo retrieval from a web source with Selenium and headless Chrome, including page scrolling to load posts and image selection. Also implemented frame-by-frame video-note processing with visual effects and returned the result as a video note.
  • Prepared separate help menus, OpenRouter usage-limit reporting and failover to the next configured API key after request failures. Restricted the Telegram bot to configured users and chats and the Discord bot to a configured server; added a shared asynchronous launcher. Wrote Russian and English documentation for setup, commands, platform differences and project features. Integrated an external language model; did not train a custom model.