diff --git a/.env.example b/.env.example index 76b2665..6323e1b 100644 --- a/.env.example +++ b/.env.example @@ -1,8 +1,9 @@ DISCORD_TOKEN="" # Your bot token CLIENT_ID="" # Your bot's application ID -SERVER_ID= +SERVER_ID= # Discord Server ID where the bot will operate MODERATORS_ROLE_IDS= # Comma separated list of role IDs that are Moderators(Mods, Admins, etc) REPEL_LOG_CHANNEL_ID= # Channel ID where the bot will log repel actions +REPEL_ROLE_ID= # Role ID assigned to users who can use the repel command GUIDES_CHANNEL_ID="" # The ID of the channel where guides will be posted diff --git a/README.md b/README.md new file mode 100644 index 0000000..7ee3074 --- /dev/null +++ b/README.md @@ -0,0 +1,131 @@ +A comprehensive Discord bot designed specifically for the Web Dev Discord server, providing helpful resources, documentation lookup, moderation tools, and educational content for web developers. +
+
+ +# Features + + +### Documentation Commands +- **`/mdn [query]`** - Search MDN Web Docs for web development documentation +- **`/npm [query]`** - Search npm registry for packages +- **`/baseline [query]`** - Check browser baseline compatibility for web features + + +### Educational Resources +- **`/guides [subject]`** - Access detailed guides on various web development topics + +### Discord Server Tips +- **`/tips [subject]`** - Get quick tips on interacting within the Web Dev Discord server + +### Moderation Tools +- **`/repel [target] [reason]`** - Advanced moderation command (meant to be given to a high quantity of volunteer assistants) that: + - 1: Checks bot permissions. + - 2: Checks target's role to make sure it's under in hierarchy. + - 3: Times out target user. + - 4: Deletes target user's very recent messages across channels. + - 5: Logs the action to a channel. + + +### Utility Commands +- **`/ping`** - Basic connectivity test to verify bot responsiveness + +
+ +# Installation & Setup + +### Prerequisites +- Node.js (version specified in `.nvmrc`) +- pnpm package manager +- Discord Bot Token + +
+ + +1. Clone the repository: + ```bash + git clone + cd webdev-bot + ``` + +2. Install dependencies: + ```bash + pnpm install + ``` + +3. Create a `.env.local` file based on `.env.example` and fill in the required environment variables: + ```bash + cp .env.example .env.local + # Edit .env.local to add your Discord bot token and other configurations + ``` + +4. Build and start the bot: + ```bash + pnpm run build:dev + pnpm start + ``` + +- Or for development with hot reloading: + ```bash + pnpm run dev + ``` + +
+ + +## Docker Support +To use docker with the bot, run: +```bash +# Development +pnpm run docker:dev + +# Production +pnpm run docker:prod + +# Build only +pnpm run docker:build +``` + +
+ + + + +# Required Permissions + +- Send Messages +- Read Message History +- Manage Messages +- Moderate Members +- Use Slash Commands + +
+ + +# Contributing + +1. Fork the repository +2. Create a feature branch +3. Make your changes +4. Run tests and linting +5. Submit a pull request + +
+ + +### Adding New Guides or Tips +1. Add markdown files to `src/commands/guides/subjects/` or `src/commands/tips/subjects/` +2. Include frontmatter with `name` field +3. The bot will automatically detect and load new content + +
+ +# Support + +For issues, questions, or feature requests: +- Open an issue on GitHub +- Contact the Web Dev Discord server moderators + +
+ + +**Made with ❤️ for the Web Dev Discord community**