Life Left Bot — Telegram bot that calculates your remaining life expectancy based on UN data.
- Go 1.21+
- Telegram Bot Token (from @BotFather)
- Clone the repository
- Copy
.env.exampleto.envand set yourTELEGRAM_BOT_TOKEN - Run:
go mod tidy
go run .| Variable | Description | Required |
|---|---|---|
TELEGRAM_BOT_TOKEN |
Telegram bot token from BotFather | Yes |
PORT |
Health check server port (default: 8080) | No |
go build -o life-left-bot .FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o life-left-bot .
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/life-left-bot .
CMD ["./life-left-bot"]- Asks for date of birth
- Asks for sex (affects life expectancy)
- Asks for country (optional, defaults to world average)
- Shows visual progress bar of life lived
- Displays days lived and days remaining
This project is licensed under the MIT License.