Skip to content

hackroid/tg-dumb-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TG DUMB BOT

pull_request_closed docker_pull issue license last_commit

This is a funny tg dumb bot.

Features

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.

Usage

Build from source

Build with Go

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 &

Build with Docker

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

Use DockerHub Image

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