A Telegram bot that can impersonate you by responding to messages using custom instructions
This bot monitors your Telegram business messages and responds automatically by pretending to be you, making it appear as if you're actively participating in conversations.
Warning: this bot is designed to impersonate you on Telegram. Use responsibly and ensure compliance with Telegram's Terms of Service and applicable laws in your jurisdiction.
- ๐ค AI-powered responses: Uses LLM to generate human-like replies
- ๐ Multiple instruction sets: Configure different behaviors for different chats
- ๐ผ Business message support: Works with Telegram Business accounts
- ๐๏ธ Redis storage: Persistent conversation history and queue management
- โฐ Configurable scheduling: Responds to messages every 7 minutes by default
- ๐ณ Docker support: Easy deployment with Docker Compose
- Node.js
- Redis server
- Telegram Bot Token (from @BotFather)
- LLM service (OpenAI, Cloudflare AI, Ollama, Llama.cpp or OpenAI Compatible API)
- Clone the repository:
git clone <repository-url>
cd fake-me- Install dependencies:
npm install- Create configuration file:
cp config.template.yml config.yml- Create environment file:
cp .env.template .env-
Configure your environment variables in
.env -
Configure your configuration in
config.yml -
Compile TypeScript:
npm run compile- Start the bot:
npm start-
Copy
.env.templateto.envand configure with own keys, etc. -
Copy
config.template.ymltoconfig.ymland configure with chats instructions. -
Start with Docker Compose:
docker-compose -f docker/docker-compose.yml up -d # --build to build from source| Variable | Description | Default |
|---|---|---|
TELEGRAM_BOT_TOKEN |
Your Telegram bot token (required) | - |
TELEGRAM_OWN_ID |
Your Telegram user ID (to distinguish your messages) (required) | - |
OPENAI_API_KEY |
Your OpenAI API key (optional, for OpenAI integration) | - |
OLLAMA_URI |
URI for the Ollama server (optional) | http://localhost:11434 |
OLLAMA_MODEL |
Model to use with Ollama (optional) | llama3.1 |
CLOUDFLARE_ACCOUNT_ID |
Cloudflare account ID (optional, for Cloudflare AI) | - |
CLOUDFLARE_AUTH_KEY |
Cloudflare authorization key (optional, for Cloudflare AI) | - |
CLOUDFLARE_MODEL |
Cloudflare model name (optional, for Cloudflare AI) | - |
LLAMA_CPP_MODEL_PATH |
Path to GGUF model file (optional, for Llama.cpp integration) | - |
REDIS_URL |
URL for the Redis server (optional) | redis://localhost:6379 |
TZ |
Timezone | UTC |
The bot uses instruction sets to define different behaviors for different chats:
version: 1
instruction_sets:
default:
name: Default behavior
description: Pretend to be the user and reply without getting caught
instructions:
- You are an AI that can pretend to be a real person, but no one has to know about it.
- You will receive messages and you will have to respond by pretending to be the recipient of the messages without getting caught.
- Do not answer with a question unless it is really necessary in the speech.
- You are not an assistant. You don't have to serve the user but just have conversation.
- It is important that you respond using the same language used by the other person.
emojis:
name: Emojis behavior
description: Reply always with only emojis
instructions:
- Reply always with only emojis
chats:
- instruction_set: default
ids:
- 13579
- 24680
- instruction_set: emojis
ids:
- 123456789- Message Reception: The bot listens for business messages on Telegram
- Message Storage: Incoming messages are stored in Redis with conversation history
- Queue Management: Non-self messages are added to a processing queue
- Scheduled Processing: Every 7 minutes, the bot processes queued chats
- AI Response: Generates responses using configured instruction sets and chat history
- Message Sending: Sends AI-generated responses back to the original chat
- Set up a Telegram Business account
- Create a bot using @BotFather
- Configure LLM to use
- Configure the bot with your credentials
- Add chat IDs and instruction sets to your
config.ymlfile- Finding chat IDs: forward a message of target chat to a bot like @my_id_bot
- Start the bot and let it handle your messages automatically
Fake Me is made with โฅ by derogab and it's released under the MIT license.
If you like this project or directly benefit from it, please consider buying me a coffee:
๐ bc1qd0qatgz8h62uvnr74utwncc6j5ckfz2v2g4lef
โก๏ธ [email protected]
๐ถ Sponsor on GitHub