Telegram antispam
Remove spam messages and chats with spammers, logging them in the process, saving spam messages and senders info to dedicated spam chat if so configured.
Take a look at config.toml.sample
. Copy it somewhere as config.toml
, fill in the details.
You'll need api_id
and api_hash
from my.telegram.org.
Docker image built with provided Dockerfile
has following mount points:
/app/db
— tdlib database, including but not limited to authorization data/app/config.toml
— your configuration/app/erl_crash.dump
— crash dump if needed (optional)/app/log
— some logs (optional)
docker build -t tgas .
or
./build.sh
docker run \
-v `pwd`/config.toml:/app/config.toml \
-v `pwd`/db:/app/db \
-i -t tgas \
start_iex
or
./run.sh start_iex
You need to authorize
iex> :tdlib.phone_number :tgas, "+12345678"
iex> :tdlib.auth_code :tgas, "23456"
iex> :tdlib.auth_password :tgas, "yourPassword"
You can also list your chats here
iex> Tgas.Session.getChats
... or find some specific chat by title, using regular expression
iex> Tgas.Session.findChat ~r/secret group/i
docker run \
-v `pwd`/config.toml:/app/config.toml \
-v `pwd`/db:/app/db \
-i -t tgas
or
./run.sh
For options run
./run.sh help