A Discord bot for the Base42 hackerspace community that provides calendar integration and server information.
- 📅 Weekly Events: Shows events for the next 7 days
- 🗓️ Monthly Events: Shows events for the next 30 days
- 📚 Past Events: Shows events from the past 30 days
- ℹ️ Server Info: Displays information about Base42
- 👤 User Info: Shows user information and roles
This bot uses environment variables for configuration. Copy .env.example to .env and fill in the required values:
cp .env.example .envRequired environment variables:
DISCORD_TOKEN: Your Discord bot tokenDISCORD_CLIENT_ID: Your Discord application client IDGUILD_ID: The Discord server ID where the bot will be usedGOOGLE_API_KEY: Google Calendar API key for accessing calendar events
-
Install dependencies:
npm install
-
Configure environment variables in
.envfile -
Run in development mode:
npm run dev
- Set up your environment variables in a
.envfile - Run with Docker Compose:
docker-compose up -d
docker build -t deepthought .
docker run -d \
--name deepthought-bot \
-e DISCORD_TOKEN=your_token \
-e DISCORD_CLIENT_ID=your_client_id \
-e GUILD_ID=your_guild_id \
-e GOOGLE_API_KEY=your_api_key \
--restart unless-stopped \
deepthoughtThe project includes a GitHub Actions workflow that:
- Builds a Docker image when code is pushed to the
mainbranch - Pushes the image to GitHub Container Registry (ghcr.io)
- Tags the image with the branch name, git SHA, and 'latest' for main branch
The workflow requires no additional setup - it uses GitHub's built-in container registry and authentication.
src/
├── base/
│ ├── classes/ # Base classes
│ ├── constants/ # Application constants
│ ├── enums/ # Enumerations
│ ├── interfaces/ # TypeScript interfaces
│ └── utilities/ # Utility functions
├── commands/ # Discord slash commands
└── events/ # Discord event handlers
npm run dev: Run in development mode with hot reloadnpm run build: Build TypeScript to JavaScriptnpm run start: Clean build and start productionnpm run startNoClean: Build and start without cleaning
This project is licensed under the ISC License.