Public
Like
wikiapptry
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v4View latest version
A Wikipedia-style bot that can be integrated with WhatsApp to provide fun facts, audio clips, and video content on demand.
- Respond to user queries with relevant fun facts
- Send MP3 audio clips on request
- Share MP4 video content when requested
- Toggle between different content types
- Remember user preferences
/backend/index.ts- Main HTTP endpoint for WhatsApp webhook/backend/database/- SQLite database setup and queries/backend/handlers/- Message handling logic/backend/content/- Content management for facts, audio, and video/shared/- Shared types and utilities
- Set up a WhatsApp Business API account or use a service like Twilio
- Configure the webhook URL to point to this Val
- Set the following environment variables:
WHATSAPP_VERIFY_TOKEN- For webhook verification
Users can interact with the bot using commands:
!fact- Get a random fun fact!audio- Get a random audio clip!video- Get a random video!fact [topic]- Get a fact about a specific topic!help- Show available commands
This project uses SQLite for storage and is built to run on Val Town.