|
| 1 | +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. |
| 2 | +<br> |
| 3 | +<br> |
| 4 | + |
| 5 | +# Features |
| 6 | + |
| 7 | + |
| 8 | +### Documentation Commands |
| 9 | +- **`/mdn [query]`** - Search MDN Web Docs for web development documentation |
| 10 | +- **`/npm [query]`** - Search npm registry for packages |
| 11 | +- **`/baseline [query]`** - Check browser baseline compatibility for web features |
| 12 | + |
| 13 | + |
| 14 | +### Educational Resources |
| 15 | +- **`/guides [subject]`** - Access detailed guides on various web development topics |
| 16 | + |
| 17 | +### Discord Server Tips |
| 18 | +- **`/tips [subject]`** - Get quick tips on interacting within the Web Dev Discord server |
| 19 | + |
| 20 | +### Moderation Tools |
| 21 | +- **`/repel [target] [reason]`** - Advanced moderation command (meant to be given to a high quantity of volunteer assistants) that: |
| 22 | + - 1: Checks bot permissions. |
| 23 | + - 2: Checks target's role to make sure it's under in hierarchy. |
| 24 | + - 3: Times out target user. |
| 25 | + - 4: Deletes target user's very recent messages across channels. |
| 26 | + - 5: Logs the action to a channel. |
| 27 | + |
| 28 | + |
| 29 | +### Utility Commands |
| 30 | +- **`/ping`** - Basic connectivity test to verify bot responsiveness |
| 31 | + |
| 32 | +<br> |
| 33 | + |
| 34 | +# Installation & Setup |
| 35 | + |
| 36 | +### Prerequisites |
| 37 | +- Node.js (version specified in `.nvmrc`) |
| 38 | +- pnpm package manager |
| 39 | +- Discord Bot Token |
| 40 | + |
| 41 | +<br> |
| 42 | + |
| 43 | + |
| 44 | +1. Clone the repository: |
| 45 | + ```bash |
| 46 | + git clone <repository-url> |
| 47 | + cd webdev-bot |
| 48 | + ``` |
| 49 | + |
| 50 | +2. Install dependencies: |
| 51 | + ```bash |
| 52 | + pnpm install |
| 53 | + ``` |
| 54 | + |
| 55 | +3. Create a `.env.local` file based on `.env.example` and fill in the required environment variables: |
| 56 | + ```bash |
| 57 | + cp .env.example .env.local |
| 58 | + # Edit .env.local to add your Discord bot token and other configurations |
| 59 | + ``` |
| 60 | + |
| 61 | +4. Build and start the bot: |
| 62 | + ```bash |
| 63 | + pnpm run build:dev |
| 64 | + pnpm start |
| 65 | + ``` |
| 66 | + |
| 67 | +- Or for development with hot reloading: |
| 68 | + ```bash |
| 69 | + pnpm run dev |
| 70 | + ``` |
| 71 | + |
| 72 | +<br> |
| 73 | + |
| 74 | + |
| 75 | +## Docker Support |
| 76 | +To use docker with the bot, run: |
| 77 | +```bash |
| 78 | +# Development |
| 79 | +pnpm run docker:dev |
| 80 | + |
| 81 | +# Production |
| 82 | +pnpm run docker:prod |
| 83 | + |
| 84 | +# Build only |
| 85 | +pnpm run docker:build |
| 86 | +``` |
| 87 | + |
| 88 | +<br> |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | +# Required Permissions |
| 94 | + |
| 95 | +- Send Messages |
| 96 | +- Read Message History |
| 97 | +- Manage Messages |
| 98 | +- Moderate Members |
| 99 | +- Use Slash Commands |
| 100 | + |
| 101 | +<br> |
| 102 | + |
| 103 | + |
| 104 | +# Contributing |
| 105 | + |
| 106 | +1. Fork the repository |
| 107 | +2. Create a feature branch |
| 108 | +3. Make your changes |
| 109 | +4. Run tests and linting |
| 110 | +5. Submit a pull request |
| 111 | + |
| 112 | +<br> |
| 113 | + |
| 114 | + |
| 115 | +### Adding New Guides or Tips |
| 116 | +1. Add markdown files to `src/commands/guides/subjects/` or `src/commands/tips/subjects/` |
| 117 | +2. Include frontmatter with `name` field |
| 118 | +3. The bot will automatically detect and load new content |
| 119 | + |
| 120 | +<br> |
| 121 | + |
| 122 | +# Support |
| 123 | + |
| 124 | +For issues, questions, or feature requests: |
| 125 | +- Open an issue on GitHub |
| 126 | +- Contact the Web Dev Discord server moderators |
| 127 | + |
| 128 | +<br> |
| 129 | + |
| 130 | + |
| 131 | +**Made with ❤️ for the Web Dev Discord community** |
0 commit comments