Skip to content

Commit 7746ca8

Browse files
docs: error messages
1 parent 57b1f9c commit 7746ca8

File tree

1 file changed

+179
-0
lines changed

1 file changed

+179
-0
lines changed
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,180 @@
11
# Error Messages
2+
3+
Common GitCord error messages and how to fix them.
4+
5+
## Authentication Errors
6+
7+
### Invalid Discord Token
8+
9+
**Error:**
10+
```
11+
Invalid Discord token! Please check your DISCORD_TOKEN in the .env file.
12+
```
13+
14+
**Fix:**
15+
1. Go to [Discord Developer Portal](https://discord.com/developers/applications)
16+
2. Select your application
17+
3. Go to "Bot" section
18+
4. Click "Reset Token" to get a new token
19+
5. Update your `.env` file
20+
21+
### Login Failure
22+
23+
**Error:**
24+
```
25+
discord.errors.LoginFailure: 401 Unauthorized
26+
```
27+
28+
**Fix:**
29+
- Check your bot token is correct
30+
- Make sure bot application exists and is active
31+
32+
## Permission Errors
33+
34+
### Missing Permissions
35+
36+
**Error:**
37+
```
38+
You don't have permission to use this command!
39+
```
40+
41+
**Fix:**
42+
- Check your role permissions in server
43+
- Make sure you have the right permission level
44+
- Contact a server administrator
45+
46+
### Bot Permission Issues
47+
48+
**Error:**
49+
```
50+
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions
51+
```
52+
53+
**Fix:**
54+
- Go to Server Settings → Roles
55+
- Make sure bot's role has necessary permissions
56+
- Move bot's role higher in the role list
57+
58+
## Command Errors
59+
60+
### Command Not Found
61+
62+
**Error:**
63+
```
64+
Command not found. Try `!help` for available commands.
65+
```
66+
67+
**Fix:**
68+
- Check command spelling
69+
- Run `/synccommands` to update slash commands
70+
- Try `!help` to see available commands
71+
72+
## YAML Errors
73+
74+
### File Not Found
75+
76+
**Error:**
77+
```
78+
YAML file not found at: {path}
79+
```
80+
81+
**Fix:**
82+
- Check the file path is correct
83+
- Make sure the file exists
84+
- Use the right path format
85+
86+
### Invalid YAML
87+
88+
**Error:**
89+
```
90+
Failed to parse YAML file: {error}
91+
```
92+
93+
**Fix:**
94+
- Use a YAML validator to check syntax
95+
- Check indentation (use spaces, not tabs)
96+
- Make sure all quotes match
97+
98+
### Missing Required Field
99+
100+
**Error:**
101+
```
102+
Missing required field: {field}
103+
```
104+
105+
**Fix:**
106+
- Add the missing field to your YAML
107+
- Required fields: `name`, `type`, `position`
108+
- Check field spelling
109+
110+
### Invalid Channel Type
111+
112+
**Error:**
113+
```
114+
Channel type '{type}' is not supported. Use 'text' or 'voice'.
115+
```
116+
117+
**Fix:**
118+
- Use only "text", "voice", or "category"
119+
- Check spelling in your YAML file
120+
121+
## Network Errors
122+
123+
### Fetch Error
124+
125+
**Error:**
126+
```
127+
Failed to fetch content from the URL: {error}
128+
```
129+
130+
**Fix:**
131+
- Check the URL is valid and accessible
132+
- Make sure URL starts with http:// or https://
133+
- Try a different URL to test
134+
135+
### No Content Found
136+
137+
**Error:**
138+
```
139+
No readable text content was found on the provided URL.
140+
```
141+
142+
**Fix:**
143+
- Try a different website
144+
- Check if the website has text content
145+
- Some websites block content fetching
146+
147+
## Discord API Errors
148+
149+
### Discord API Error
150+
151+
**Error:**
152+
```
153+
Discord API error: {error}
154+
```
155+
156+
**Fix:**
157+
- Check Discord's status
158+
- Wait a few minutes and try again
159+
- Check your internet connection
160+
161+
### Unexpected Error
162+
163+
**Error:**
164+
```
165+
An unexpected error occurred: {error}
166+
```
167+
168+
**Fix:**
169+
- Restart the bot
170+
- Check the bot logs for more details
171+
- Report the issue with error details
172+
173+
## Getting Help
174+
175+
If you can't fix the error:
176+
177+
1. Copy the exact error message
178+
2. Check the [Common Issues](./common-issues.md) page
179+
3. Enable [Debug Mode](./debug-mode.md) for more info
180+
4. Ask for help in the project's GitHub issues

0 commit comments

Comments
 (0)