README.md
Orbit Discord Bot
Orbit is a feature-rich Discord bot designed to enhance community server functionality with various utility, moderation, and fun commands.
Features
Utility Commands
/ping
- Check bot latency/serverinfo
- Get detailed server information/userinfo
- View user profile details/avatar
- Display user's avatar/roleinfo
- Get information about a role/giveaway
- Create and manage giveaways/remind
- Set personal reminders/poll
- Create interactive polls
Moderation Commands
/ban
- Ban users from the server/timeout
- Temporarily timeout users
Fun Commands
/8ball
- Ask the magic 8-ball a question/joke
- Get random jokes (Programming/General/Pun)/random
- Generate random numbers/echo
- Make the bot repeat your message/booru
- Search for images across various booru sites (NSFW)/play-sound
- Play audio files in voice channels
Services
- Giveaway Service: Automatically manages and ends giveaways
- Reminder Service: Handles scheduled reminders
- Bluesky Service: Cross-posts from Bluesky to Discord (configurable)
- HTTP Server: Provides API endpoints for bot functionality
Technical Stack
- Runtime: Node.js
- Language: TypeScript
- Database: Supabase
- Dependencies:
- discord.js
- @supabase/supabase-js
- express
- @atproto/api
- Various utility packages
Setup
- Clone the repository:
git clone https://github.com/chocoOnEstrogen/orbit.git
cd orbit
- Install dependencies:
npm install
- Copy
.env.sample
to.env
and fill in the required values:
DISCORD_BOT_TOKEN=your_bot_token
DISCORD_GUILD_ID=your_guild_id
DISCORD_CLIENT_ID=your_client_id
NODE_ENV=development
BLUESKY_IDENTIFIER=your_bluesky_handle
BLUESKY_PASSWORD=your_bluesky_password
BLUESKY_FEED_INTERVAL=60000
SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE=your_supabase_service_role
SUPABASE_URL=your_supabase_url
- Set up the database:
- Execute the SQL scripts in
supabase/data.sql
in your Supabase project
- Build the project:
npm run build
- Deploy commands:
npm run deploy-commands
- Start the bot:
npm start
For development:
npm run dev
Development
Project Structure
src/commands/
- Command implementationssrc/events/
- Discord event handlerssrc/services/
- Background servicessrc/configs/
- Configuration filessrc/types/
- TypeScript type definitionssrc/utils/
- Utility functionssrc/server/
- HTTP server implementation
Adding New Commands
- Create a new file in the appropriate category under
src/commands/
- Implement the command using the Command type interface
- Run
npm run deploy-commands
to register new commands
Code Style
The project uses Prettier for code formatting:
npm run format # Format code
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
ISC License - See LICENSE file for details
Support
For issues and feature requests, please use the GitHub issue tracker.