NSFWGuard is a project that wraps NSFW API into a Telegram bot known as NSFWGuard. Using this repository one can easily launch a similar bot with whatever modifications needed for a specific purpose.
- Docker with docker-compose have to be installed and available in your system.
- Build open_nsfw image:
docker build -t open_nsfw https://raw.githubusercontent.com/rahiel/open_nsfw--/master/Dockerfile
- Make sure you have your Telegram bot token obtained from the BotFather.
- Create
.env
file in a project root:
TLGRM_TOKEN=paste-your-bot-token-here
NSFW_API_ADDR=http://nsfwapi:8080
NSFW_API_PREC=0.95
- Run
docker-compose up
in a project root. - Wait a bit until process stops producing logs...
Bot service should be up and running by now; any changes in ./NSFWGuard
dir will trigger restart of the service. Also, new dependencies will be installed if found by go get ./...
cmd.