Telegram-CJK-Search-Bot
A simple message-searching bot that supports CJK (Chinese, Japanese, Korean) languages.
Features
- 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.
Quick Start
- 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
- Edit the
docker-compose.yml
file to replaceTELOXIDE_TOKEN=xxx:xxx
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.
Credits
Powered by the blazing-fast Meilisearch.
Powered by the easy-to-use teloxide.
Inspired by telegram-search-bot.