Skip to content

Commit e65d98c

Browse files
MorrowShorehmd-ali
andauthored
Create README.md (#20)
* Create README.md * Update README.md * 🔨 refactor: add REPEL_ROLE_ID to .env.example * 📚 docs: update README to clarify Discord server tips and installation instructions --------- Co-authored-by: Ali Hammoud <[email protected]>
1 parent cde3518 commit e65d98c

File tree

2 files changed

+133
-1
lines changed

2 files changed

+133
-1
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
DISCORD_TOKEN="" # Your bot token
22
CLIENT_ID="" # Your bot's application ID
33

4-
SERVER_ID=
4+
SERVER_ID= # Discord Server ID where the bot will operate
55
MODERATORS_ROLE_IDS= # Comma separated list of role IDs that are Moderators(Mods, Admins, etc)
66

77
REPEL_LOG_CHANNEL_ID= # Channel ID where the bot will log repel actions
8+
REPEL_ROLE_ID= # Role ID assigned to users who can use the repel command
89
GUIDES_CHANNEL_ID="" # The ID of the channel where guides will be posted

README.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
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

Comments
 (0)