SearchGram is a Telegram bot that improves search experience for Chinese, Japanese, and Korean (CJK) languages and provides message backup functionality.
Telegram's search function has poor support for CJK languages because there are no spaces to separate words.
Issues regarding this have been reported years ago but have yet to be resolved.
-t=GROUP keyword
, support types are ["BOT", "CHANNEL", "GROUP", "PRIVATE", "SUPERGROUP"]-u=user_id|username keyword
-m=e keyword
or directly "keyword"
-t=GROUP -u=user_id|username keyword
/private [username] keyword
: search in private chat with username, if username is omitted, search in all private
chats. This also applies to all above search types.\n/start - Start the bot
/ping - Check if the bot is alive
/help - Show help message and search syntax
/delete - Delete all messages from specific chat
/bot - Search messages from bots
/channel - Search messages from channels
/group - Search messages from groups
/private - Search messages from private chats
/supergroup - Search messages from supergroups
SearchGram works by:
If you're concerned about chat history prior to running the bot,
you can relax because SearchGram offers a solution to sync your chat history using a configuration file.
Any system that can run Python 3.8+ and MeiliSearch should be able to run SearchGram.
Better to have bigger ram so MeiliSearch can run faster.
If you have limited RAM, you can set environment variables MEILI_MAX_INDEXING_MEMORY=800M
to limit the RAM use in
MeiliSearch.
For more information, please see Max indexing memory
Note: Because chat history should be kept private, we do not offer any public bots.
Please follow the steps below to install SearchGram on your own server.
This guide will show you how to install SearchGram with our default search engine, MeiliSearch.
To learn how to use SearchGram in Docker with different search engine, please refer to the Docker.md
Use your favorite editor to modify config.py
, example:
APP_ID = 176552
APP_HASH = "667276jkajhw"
TOKEN = "123456:8hjhad"
MEILI_HOST = "localhost"
OWNER_ID = "2311231"
If you have limited network access, such as in China, you will need to set up a proxy.
PROXY = {"scheme": "socks5", "hostname": "localhost", "port": 1080}
Open a terminal (such as cmd or iTerm), navigate to the directory where you have saved the code, and then:
python client.py
Enter your phone number and log in to the client. You can exit by pressing Ctrl + C
.
See here
Open two terminals and run the following commands in each terminal:
python client.py
python bot.py
python add_timestamp.py
If you would like to donate to the project using Stripe, please click on the button below.
You can choose the currency and payment method that best suits you.
USD(Card, Apple Pay and Google Pay) | SEK(Card, Apple Pay and Google Pay) | CNY(Card, Apple Pay, Google Pay and Alipay) |
---|---|---|
USD | SEK | CNY |
![]() |
![]() |
![]() |
This project is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.