Skip to content

Commit 17c2076

Browse files
authored
Create README.md
1 parent 137b48e commit 17c2076

File tree

1 file changed

+139
-0
lines changed

1 file changed

+139
-0
lines changed

README.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
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+
- **`/tips [subject]`** - Get helpful tips and best practices for web development
17+
18+
19+
### Moderation Tools
20+
- **`/repel [target] [reason]`** - Advanced moderation command (meant to be given to a high quantity of volunteer assistants) that:
21+
- 1: Checks bot permissions.
22+
- 2: Checks target's role to make sure it's under in hierarchy.
23+
- 3: Times out target user.
24+
- 4: Deletes target user's very recent messages across channels.
25+
- 5: Logs the action to a channel.
26+
27+
28+
### Utility Commands
29+
- **`/ping`** - Basic connectivity test to verify bot responsiveness
30+
31+
<br>
32+
33+
# Installation & Setup
34+
35+
### Prerequisites
36+
- Node.js (version specified in `.nvmrc`)
37+
- pnpm package manager
38+
- Discord Bot Token
39+
40+
<br>
41+
42+
43+
1. Clone the repository:
44+
```bash
45+
git clone <repository-url>
46+
cd webdev-bot-main
47+
```
48+
49+
2. Install dependencies:
50+
```bash
51+
pnpm install
52+
```
53+
54+
3. Set up environment variables (create `.env` file):
55+
```
56+
DISCORD_TOKEN=your_bot_token_here
57+
DISCORD_CLIENT_ID=your_client_id_here
58+
DISCORD_GUILD_ID=your_guild_id_here
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:
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+
# Configuration
92+
93+
### Environment Variables
94+
- `DISCORD_TOKEN` - Discord bot token (required)
95+
- `DISCORD_CLIENT_ID` - Discord application client ID
96+
- `DISCORD_GUILD_ID` - Target guild/server ID
97+
- Additional moderation-specific configuration in `src/env.ts`
98+
99+
<br>
100+
101+
### Bot Permissions
102+
The bot requires the following Discord permissions:
103+
- Send Messages
104+
- Read Message History
105+
- Manage Messages
106+
- Moderate Members
107+
- Use Slash Commands
108+
109+
<br>
110+
111+
112+
# Contributing
113+
114+
1. Fork the repository
115+
2. Create a feature branch
116+
3. Make your changes
117+
4. Run tests and linting
118+
5. Submit a pull request
119+
120+
<br>
121+
122+
123+
#### Adding New Guides/Tips
124+
1. Add markdown files to `src/commands/guides/subjects/` or `src/commands/tips/subjects/`
125+
2. Include frontmatter with `name` field
126+
3. The bot will automatically detect and load new content
127+
128+
<br>
129+
130+
## Support
131+
132+
For issues, questions, or feature requests:
133+
- Open an issue on GitHub
134+
- Contact the Web Dev Discord server moderators
135+
136+
<br>
137+
138+
139+
**Made with ❤️ for the Web Dev Discord community**

0 commit comments

Comments
 (0)