A simple Telegram bot that responds with 'pong' when you send the '/ping' command.
This code is provided for VERIFICATION and TRANSPARENCY purposes only.
- ✅ You MAY: View, audit, suggest improvements, contribute
- ❌ You MAY NOT: Use, copy, modify, distribute, or incorporate into other projects
See LICENSE for full terms. This is NOT open source software.
-
Create a Telegram Bot
- Message @BotFather on Telegram
- Use
/newbotcommand and follow the instructions - Save the bot token you receive
-
Configure Environment
- Copy
.env.exampleto.env - Replace
your_bot_token_herewith your actual bot token
Or set the environment variable directly:
export TELEGRAM_BOT_TOKEN=your_bot_token_here - Copy
go run main.go-
Build the image
docker build -t telegram-ping-bot . -
Run the container
docker run -e TELEGRAM_BOT_TOKEN=your_bot_token_here telegram-ping-bot
- Find your bot on Telegram using the username you created
- Send
/pingcommand - The bot will respond with 'pong'
/ping- Bot responds with 'pong'
/health- Health check (returns "OK")/version- Shows build information and GitHub commit/attestation- Cryptographic proof of code integrity
To cryptographically verify that the running code matches this GitHub repository:
# Download and run the verification script
curl -O https://raw.githubusercontent.com/engagementlabs/safe-code/main/verify.py
python3 verify.py https://safe-code-p.engagelabs.org{
"commit_sha": "abc123def456",
"build_time": "2024-01-15T10:30:00Z",
"source_hash": "d4e5f6a7b8c9...",
"build_hash": "1a2b3c4d5e6f...",
"github_url": "https://github.com/engagementlabs/safe-code/commit/abc123def456",
"attestation": "9f8e7d6c5b4a...",
"nitro_document": "eyJ0eXAiOiJKV1Q..."
}- Source Hash: Downloads source from GitHub and calculates SHA256
- Build Hash: Verifies the running binary matches the build
- Attestation: Cryptographic signature proving integrity
- Nitro Enclave: Hardware-level attestation (when available)
This provides cryptographic proof that the running code is exactly what's in this repository.
- Go 1.21+