This is a funny tg dumb bot.
Warning
All code only for reference.
Check CAREFULLY before deployment.
♻️ Using weibo
command can feed you the TOP10 RUBBISH on Weibo platform RIGHT NOW!
🎲 The choice
command gives you a random choice between serveral space-sperated options.
🤡 This bot will also randomly reply "Surprise Sunshine Boy!" to a new arrived message in the group with a probability of 0.15.
Propose your function now with a single PR.
Dependencies
go get github.com/go-telegram-bot-api/telegram-bot-api/v5
go get github.com/joho/godotenv
go get github.com/gocolly/colly/v2
Paste your token into .env
like:
TELEGRAM_APITOKEN=123456:ABCDEFGHIJKLMN
DEBUG=1
Then
rm -rf bin
go mod tidy
go build -o bin/ ./app/main
nohup ./bin/main > ./test.log 2>&1 &
docker build . -t test
# run on detach
docker run -d -v /etc/localtime:/etc/localtime:ro -e token="123456:ABCDEFGHIJKLMN" test
# run in foreground
docker run -it -v /etc/localtime:/etc/localtime:ro -e token="123456:ABCDEFGHIJKLMN" test
docker pull hackroid/tg-dumb-bot:latest
docker run --name bot-one -d -v /etc/localtime:/etc/localtime:ro -e token="123456:ABCDEFGHIJKLMN" hackroid/tg-dumb-bot:latest