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.
/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
/guides [subject]- Access detailed guides on various web development topics/tips [subject]- Get helpful tips and best practices for web development
/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.
/ping- Basic connectivity test to verify bot responsiveness
- Node.js (version specified in
.nvmrc) - pnpm package manager
- Discord Bot Token
-
Clone the repository:
git clone <repository-url> cd webdev-bot-main
-
Install dependencies:
pnpm install
-
Set up environment variables (create
.envfile):DISCORD_TOKEN=your_bot_token_here DISCORD_CLIENT_ID=your_client_id_here DISCORD_GUILD_ID=your_guild_id_here -
Build and start the bot:
pnpm run build:dev pnpm start
- Or for development with hot reloading:
pnpm run dev
To use docker with the bot:
# Development
pnpm run docker:dev
# Production
pnpm run docker:prod
# Build only
pnpm run docker:buildDISCORD_TOKEN- Discord bot token (required)DISCORD_CLIENT_ID- Discord application client IDDISCORD_GUILD_ID- Target guild/server ID- Additional moderation-specific configuration in
src/env.ts
The bot requires the following Discord permissions:
- Send Messages
- Read Message History
- Manage Messages
- Moderate Members
- Use Slash Commands
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
- Add markdown files to
src/commands/guides/subjects/orsrc/commands/tips/subjects/ - Include frontmatter with
namefield - The bot will automatically detect and load new content
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