Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -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
131 changes: 131 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
<br>
<br>

# 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

<br>

# Installation & Setup

### Prerequisites
- Node.js (version specified in `.nvmrc`)
- pnpm package manager
- Discord Bot Token

<br>


1. Clone the repository:
```bash
git clone <repository-url>
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
```

<br>


## 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
```

<br>




# Required Permissions

- Send Messages
- Read Message History
- Manage Messages
- Moderate Members
- Use Slash Commands

<br>


# Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests and linting
5. Submit a pull request

<br>


### 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

<br>

# Support

For issues, questions, or feature requests:
- Open an issue on GitHub
- Contact the Web Dev Discord server moderators

<br>


**Made with ❤️ for the Web Dev Discord community**