A complete Telegram-bot hosting platform built on Val Town. Upload a Python bot file, and ScottHub wires it through a webhook router so it goes live instantly β no server rental, no Python process to manage.
Bot: @BlackCodeHatHostingBot Channel: @ScottHubs (required to join) Archive: every uploaded file is forwarded to
@ProjectScottCode
- π₯ Host β main dashboard
- π Server β shows the Free tier
- β¬οΈ Upload Files β drop your
main.py - π Manage Files β add, delete, set main file
- β± Host Time β 2-day countdown
- βΉ Stop / π Restart
- π Logs β recent webhook events for your bot
- π Switch Project β flip between your 2 slots
- π₯ Referral β share your link, earn 2 friends β 1 free host slot
- π Status β platform stats + your personal stats
- βΉοΈ Help
On upload of a .py file ScottHub automatically:
- Detects the bot token
- Detects admin / owner id
- Scans all
import/from β¦ import β¦and maps them to pip packages (telegramβpython-telegram-bot,bs4βbeautifulsoup4,cv2βopencv-python, etc.) - Registers the bot's webhook to the ScottHub router β bot is instantly ONLINE
- Forwards the file to
@ProjectScottCodefor archival
| Rule | Value |
|---|---|
| Cost | Free |
| Duration per slot | 2 days |
| Referrals required / slot | 2 |
| Slots per user | 2 |
Admin (6511143869) | No referrals required |
/panel β login Scott / ReyBalor21
- Dashboard (users, projects, running, messages)
- All projects list
- Per-project detail: set/remove webhook, extend time, override token, delete
- Live Telegram
getWebhookInfofeed - Event log
- Main-bot webhook control (bring the ScottHub bot itself online)
Rendering mermaid diagram...
main.ts # bootstrap, re-exports Hono app
handlers/
app.ts # Hono routes
router.ts # main-bot update dispatcher
screens.ts # every menu screen (Host, Server, Referralβ¦)
actions.ts # upload/manage/stop/restart actions
hosted_webhook.ts # router for uploaded bots (webhook-only)
access.ts # channel-join + referral gate
archive.ts # forwarder to @ProjectScottCode
panel.ts # web admin panel HTML
lib/
config.ts # all constants (token, api_id/hash, limits)
telegram.ts # Telegram Bot API client + reply keyboards
parser.ts # smart Python import/token/admin parser
utils.ts # helpers, base URL, escaping
database/
schema.ts # migrations
queries.ts # typed query layer
jobs/
expiry_sweep.ts # 15-min cron β expire projects
scripts/
setup_webhook.ts # one-time webhook registration
All config lives in lib/config.ts:
| Key | Value |
|---|---|
BOT_TOKEN | 8779579899:AAEN⦠|
CHANNEL | @ScottHubs |
ARCHIVE_CHANNEL | @ProjectScottCode |
ADMIN_ID | 6511143869 |
TG_API_ID | 31802482 |
TG_API_HASH | 184c16c584a0e350a252271029cf7eb7 |
REFERRALS_REQUIRED | 2 |
HOST_DURATION_SECONDS | 172800 (2 days) |
MAX_PROJECTS_PER_USER | 2 |
- Run
scripts/setup_webhook.tsβ registersPOST /botas the main-bot webhook β - The cron
jobs/expiry_sweep.tsruns every 15 min to auto-expire slots β - Open
/panelto manage hosted bots through the web UI β
Val Town can't run Python processes β instead, ScottHub stores each bot's code,
registers its webhook to our router, and replies via the bot's token.
When a command like /start comes in, ScottHub parses the handler text from the
Python source and responds. For production Python execution you would plug in an
external runner that reads the same DB and posts replies through the same router.
/source redirects to the Val Town source β feel free to remix!