A simple message-searching bot that supports CJK (Chinese, Japanese, Korean) languages.
- Search messages sorted by relevance.
- Edited messages will be updated in the database as well.
- Users can only search messages in chats they have already joined.
- Create a bot using @BotFather and save the token for later use.
- Edit the bot to turn ON inline mode and turn OFF privacy mode.
- Find a place to store all the data.
wget https://raw.githubusercontent.com/krishukr/telegram-cjk-search-bot/master/{docker-compose.yml,.env}
- Edit the
.env
file to enterTELOXIDE_TOKEN
with your token obtained from BotFather. docker compose up -d
- Add the bot to a chat of which you are the owner or admin. Note: Supergroup only.
- Send the command
/start@your_bot
to the bot.
And you're all set! All future messages in this chat can be searched by sending your bot inline queries, like so: @your_bot filter
.
Want to index historical messages as well? Just follow these steps:
- Export the chat messages in JSON format.
- Place the
result.json
file in the./history
directory. docker compose run --rm bot /app/import
Since there are no documents for exported messages, unexpected issues may arise during this process.
Feel free to reach me if you have any questions.
A supergroup is a type of Telegram group that supports larger member capacities and offers advanced features. Each message in a supergroup has a unique URL, which is necessary for searching and locating messages.
To create a supergroup, start by creating a public group in Telegram. Once the group is public, it converts into a supergroup automatically.
If you have existing private groups, just set the group to public, save the setting, and switch back to private. This gives you a private supergroup.
Officially, there is no public instance provided.
This projects follows Semantic Versioning. Docker image tags include MAJOR.MINOR.PATCH
and MAJOR.MINOR
.
docker compose pull
docker compose up -d
This project utilzes Nix Flake to manage development and building environment. You can run nix develop
to open an interactive shell or run direnv allow
to integrate the environment with your workflow.
Pull requests and issues would be supremely welcomed.
Powered by the blazing-fast Meilisearch.
Powered by the easy-to-use teloxide.
Inspired by telegram-search-bot.