discord-selfbot-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -0
- package/dist/core/config.d.ts +39 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +29 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors/discord-errors.d.ts +3 -0
- package/dist/core/errors/discord-errors.d.ts.map +1 -0
- package/dist/core/errors/discord-errors.js +49 -0
- package/dist/core/errors/discord-errors.js.map +1 -0
- package/dist/core/errors/index.d.ts +3 -0
- package/dist/core/errors/index.d.ts.map +1 -0
- package/dist/core/errors/index.js +3 -0
- package/dist/core/errors/index.js.map +1 -0
- package/dist/core/errors/mcp-errors.d.ts +17 -0
- package/dist/core/errors/mcp-errors.d.ts.map +1 -0
- package/dist/core/errors/mcp-errors.js +28 -0
- package/dist/core/errors/mcp-errors.js.map +1 -0
- package/dist/core/formatting/index.d.ts +2 -0
- package/dist/core/formatting/index.d.ts.map +1 -0
- package/dist/core/formatting/index.js +2 -0
- package/dist/core/formatting/index.js.map +1 -0
- package/dist/core/formatting/output.d.ts +108 -0
- package/dist/core/formatting/output.d.ts.map +1 -0
- package/dist/core/formatting/output.js +129 -0
- package/dist/core/formatting/output.js.map +1 -0
- package/dist/core/logger.d.ts +13 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +48 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/rateLimit/index.d.ts +2 -0
- package/dist/core/rateLimit/index.d.ts.map +1 -0
- package/dist/core/rateLimit/index.js +2 -0
- package/dist/core/rateLimit/index.js.map +1 -0
- package/dist/core/rateLimit/limiter.d.ts +17 -0
- package/dist/core/rateLimit/limiter.d.ts.map +1 -0
- package/dist/core/rateLimit/limiter.js +56 -0
- package/dist/core/rateLimit/limiter.js.map +1 -0
- package/dist/core/resolvers/ids.d.ts +24 -0
- package/dist/core/resolvers/ids.d.ts.map +1 -0
- package/dist/core/resolvers/ids.js +90 -0
- package/dist/core/resolvers/ids.js.map +1 -0
- package/dist/core/resolvers/index.d.ts +2 -0
- package/dist/core/resolvers/index.d.ts.map +1 -0
- package/dist/core/resolvers/index.js +2 -0
- package/dist/core/resolvers/index.js.map +1 -0
- package/dist/discord/client.d.ts +16 -0
- package/dist/discord/client.d.ts.map +1 -0
- package/dist/discord/client.js +65 -0
- package/dist/discord/client.js.map +1 -0
- package/dist/discord/index.d.ts +2 -0
- package/dist/discord/index.d.ts.map +1 -0
- package/dist/discord/index.js +2 -0
- package/dist/discord/index.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +3 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/registry.d.ts +28 -0
- package/dist/mcp/registry.d.ts.map +1 -0
- package/dist/mcp/registry.js +28 -0
- package/dist/mcp/registry.js.map +1 -0
- package/dist/mcp/server.d.ts +4 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +99 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/setup.d.ts +3 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +252 -0
- package/dist/setup.js.map +1 -0
- package/dist/tools/channels/index.d.ts +5 -0
- package/dist/tools/channels/index.d.ts.map +1 -0
- package/dist/tools/channels/index.js +157 -0
- package/dist/tools/channels/index.js.map +1 -0
- package/dist/tools/dms/index.d.ts +5 -0
- package/dist/tools/dms/index.d.ts.map +1 -0
- package/dist/tools/dms/index.js +121 -0
- package/dist/tools/dms/index.js.map +1 -0
- package/dist/tools/events/index.d.ts +5 -0
- package/dist/tools/events/index.d.ts.map +1 -0
- package/dist/tools/events/index.js +143 -0
- package/dist/tools/events/index.js.map +1 -0
- package/dist/tools/files/index.d.ts +5 -0
- package/dist/tools/files/index.d.ts.map +1 -0
- package/dist/tools/files/index.js +109 -0
- package/dist/tools/files/index.js.map +1 -0
- package/dist/tools/guilds/index.d.ts +5 -0
- package/dist/tools/guilds/index.d.ts.map +1 -0
- package/dist/tools/guilds/index.js +171 -0
- package/dist/tools/guilds/index.js.map +1 -0
- package/dist/tools/interactions/index.d.ts +5 -0
- package/dist/tools/interactions/index.d.ts.map +1 -0
- package/dist/tools/interactions/index.js +24 -0
- package/dist/tools/interactions/index.js.map +1 -0
- package/dist/tools/invites/index.d.ts +5 -0
- package/dist/tools/invites/index.d.ts.map +1 -0
- package/dist/tools/invites/index.js +30 -0
- package/dist/tools/invites/index.js.map +1 -0
- package/dist/tools/messages/index.d.ts +5 -0
- package/dist/tools/messages/index.d.ts.map +1 -0
- package/dist/tools/messages/index.js +238 -0
- package/dist/tools/messages/index.js.map +1 -0
- package/dist/tools/messages/pins.d.ts +5 -0
- package/dist/tools/messages/pins.d.ts.map +1 -0
- package/dist/tools/messages/pins.js +74 -0
- package/dist/tools/messages/pins.js.map +1 -0
- package/dist/tools/messages/reactions.d.ts +5 -0
- package/dist/tools/messages/reactions.d.ts.map +1 -0
- package/dist/tools/messages/reactions.js +124 -0
- package/dist/tools/messages/reactions.js.map +1 -0
- package/dist/tools/notifications/index.d.ts +5 -0
- package/dist/tools/notifications/index.d.ts.map +1 -0
- package/dist/tools/notifications/index.js +144 -0
- package/dist/tools/notifications/index.js.map +1 -0
- package/dist/tools/presence/index.d.ts +5 -0
- package/dist/tools/presence/index.d.ts.map +1 -0
- package/dist/tools/presence/index.js +121 -0
- package/dist/tools/presence/index.js.map +1 -0
- package/dist/tools/profile/index.d.ts +5 -0
- package/dist/tools/profile/index.d.ts.map +1 -0
- package/dist/tools/profile/index.js +37 -0
- package/dist/tools/profile/index.js.map +1 -0
- package/dist/tools/relationships/index.d.ts +5 -0
- package/dist/tools/relationships/index.d.ts.map +1 -0
- package/dist/tools/relationships/index.js +146 -0
- package/dist/tools/relationships/index.js.map +1 -0
- package/dist/tools/system/index.d.ts +5 -0
- package/dist/tools/system/index.d.ts.map +1 -0
- package/dist/tools/system/index.js +40 -0
- package/dist/tools/system/index.js.map +1 -0
- package/dist/tools/threads/index.d.ts +5 -0
- package/dist/tools/threads/index.d.ts.map +1 -0
- package/dist/tools/threads/index.js +180 -0
- package/dist/tools/threads/index.js.map +1 -0
- package/dist/tools/voice/index.d.ts +5 -0
- package/dist/tools/voice/index.d.ts.map +1 -0
- package/dist/tools/voice/index.js +145 -0
- package/dist/tools/voice/index.js.map +1 -0
- package/package.json +48 -0
package/README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./logo.png" alt="discord-selfbot-mcp" width="100">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">discord-selfbot-mcp</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
comprehensive discord selfbot mcp server with 60+ tools for full user autonomy
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<img src="https://img.shields.io/badge/license-MIT-green" alt="license">
|
|
13
|
+
<img src="https://img.shields.io/badge/language-typescript-blue" alt="language">
|
|
14
|
+
<img src="https://img.shields.io/badge/mcp-sdk-orange" alt="mcp">
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### quickstart
|
|
20
|
+
|
|
21
|
+
automatic setup wizard (extracts token via browser):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx discord-selfbot-mcp-setup
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
manual installation:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install -g discord-selfbot-mcp
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### features
|
|
34
|
+
|
|
35
|
+
**60 tools** across 14 categories.
|
|
36
|
+
|
|
37
|
+
| category | tools | description |
|
|
38
|
+
|----------|-------|-------------|
|
|
39
|
+
| **system** | 3 | health, whoami, get_config |
|
|
40
|
+
| **guilds** | 8 | list, info, members, nickname, leave, invite, create, delete |
|
|
41
|
+
| **channels** | 5 | list, info, create, delete, edit |
|
|
42
|
+
| **messages** | 8 | read, send, reply, edit, delete, search, get, forward |
|
|
43
|
+
| **reactions** | 4 | react, unreact, get_reactions, remove_all |
|
|
44
|
+
| **pins** | 3 | pin, unpin, list_pinned |
|
|
45
|
+
| **dms** | 5 | list, read, send, create, close |
|
|
46
|
+
| **threads** | 7 | list, create, join, leave, archive, read, send |
|
|
47
|
+
| **presence** | 5 | set_status, set_custom, set_activity, clear, get_user |
|
|
48
|
+
| **voice** | 5 | join, leave, set_state, get_state, list_members |
|
|
49
|
+
| **relationships** | 8 | friends, blocked, pending, request, remove, block, unblock, accept |
|
|
50
|
+
| **notifications** | 5 | mentions, mark_read, mark_guild_read, mute_channel, mute_guild |
|
|
51
|
+
| **files** | 3 | upload, download, list |
|
|
52
|
+
| **events** | 4 | list, get, rsvp, create |
|
|
53
|
+
| **profile** | 1 | edit_profile (avatar, bio, username) |
|
|
54
|
+
| **interactions** | 1 | trigger_typing |
|
|
55
|
+
| **invites** | 1 | accept_invite |
|
|
56
|
+
|
|
57
|
+
### comparison
|
|
58
|
+
|
|
59
|
+
| feature | discord-selfbot-mcp | Maol-1997 | codebyyassine | elyxlz |
|
|
60
|
+
|---------|---------------------|-----------|---------------|--------|
|
|
61
|
+
| read messages | ✅ | ✅ | ✅ | ✅ |
|
|
62
|
+
| send messages | ✅ | ✅ | ✅ | ✅ |
|
|
63
|
+
| list guilds | ✅ | ✅ | ✅ | ✅ |
|
|
64
|
+
| list channels | ✅ | ✅ | ✅ | ✅ |
|
|
65
|
+
| get user info | ✅ | ✅ | ✅ | ❌ |
|
|
66
|
+
| search messages | ✅ | ❌ | ❌ | ❌ |
|
|
67
|
+
| create channels | ✅ | ❌ | ✅ | ❌ |
|
|
68
|
+
| delete channels | ✅ | ❌ | ✅ | ❌ |
|
|
69
|
+
| edit messages | ✅ | ❌ | ❌ | ❌ |
|
|
70
|
+
| delete messages | ✅ | ❌ | ❌ | ❌ |
|
|
71
|
+
| join voice | ✅ | ❌ | ❌ | ❌ |
|
|
72
|
+
| manage friends | ✅ | ❌ | ❌ | ❌ |
|
|
73
|
+
| manage threads | ✅ | ❌ | ❌ | ❌ |
|
|
74
|
+
| setup wizard | ✅ | ❌ | ❌ | ❌ |
|
|
75
|
+
| **total tools** | **60** | **7** | **29** | **4** |
|
|
76
|
+
|
|
77
|
+
### usage
|
|
78
|
+
|
|
79
|
+
run manually (requires token):
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
export DISCORD_TOKEN='your_token'
|
|
83
|
+
npx discord-selfbot-mcp
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
configure in claude/opencode:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"mcpServers": {
|
|
91
|
+
"discord-selfbot": {
|
|
92
|
+
"command": "npx",
|
|
93
|
+
"args": ["discord-selfbot-mcp"],
|
|
94
|
+
"env": {
|
|
95
|
+
"DISCORD_TOKEN": "your_token"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### project structure
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
src/
|
|
106
|
+
├── core/ # configuration, logging, errors
|
|
107
|
+
├── discord/ # discord.js client wrapper
|
|
108
|
+
├── mcp/ # mcp server & registry
|
|
109
|
+
├── tools/ # tool implementations
|
|
110
|
+
│ ├── channels/
|
|
111
|
+
│ ├── dms/
|
|
112
|
+
│ ├── events/
|
|
113
|
+
│ ├── files/
|
|
114
|
+
│ ├── guilds/
|
|
115
|
+
│ ├── interactions/
|
|
116
|
+
│ ├── invites/
|
|
117
|
+
│ ├── messages/
|
|
118
|
+
│ ├── notifications/
|
|
119
|
+
│ ├── presence/
|
|
120
|
+
│ ├── profile/
|
|
121
|
+
│ ├── relationships/
|
|
122
|
+
│ ├── system/
|
|
123
|
+
│ ├── threads/
|
|
124
|
+
│ └── voice/
|
|
125
|
+
├── index.ts # entry point
|
|
126
|
+
└── setup.ts # setup wizard
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### troubleshooting
|
|
130
|
+
|
|
131
|
+
| problem | solution |
|
|
132
|
+
|---------|----------|
|
|
133
|
+
| **token invalid** | run `npx discord-selfbot-mcp-setup` to extract a fresh one |
|
|
134
|
+
| **rate limited** | reduce `RATE_LIMIT_CONCURRENCY` env var (default: 3) |
|
|
135
|
+
| **missing permissions** | ensure account has access to the guild/channel |
|
|
136
|
+
| **verification required** | solve captcha/2fa in browser during setup |
|
|
137
|
+
|
|
138
|
+
### license
|
|
139
|
+
|
|
140
|
+
mit
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const configSchema: z.ZodObject<{
|
|
3
|
+
discordToken: z.ZodString;
|
|
4
|
+
dangerMode: z.ZodDefault<z.ZodBoolean>;
|
|
5
|
+
maxRetries: z.ZodDefault<z.ZodNumber>;
|
|
6
|
+
rateLimitConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
logLevel: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error"]>>;
|
|
8
|
+
allowDMs: z.ZodDefault<z.ZodBoolean>;
|
|
9
|
+
allowRelationships: z.ZodDefault<z.ZodBoolean>;
|
|
10
|
+
allowVoice: z.ZodDefault<z.ZodBoolean>;
|
|
11
|
+
redactContent: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
allowedGuilds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
discordToken: string;
|
|
15
|
+
dangerMode: boolean;
|
|
16
|
+
maxRetries: number;
|
|
17
|
+
rateLimitConcurrency: number;
|
|
18
|
+
logLevel: "debug" | "info" | "warn" | "error";
|
|
19
|
+
allowDMs: boolean;
|
|
20
|
+
allowRelationships: boolean;
|
|
21
|
+
allowVoice: boolean;
|
|
22
|
+
redactContent: boolean;
|
|
23
|
+
allowedGuilds?: string[] | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
discordToken: string;
|
|
26
|
+
dangerMode?: boolean | undefined;
|
|
27
|
+
maxRetries?: number | undefined;
|
|
28
|
+
rateLimitConcurrency?: number | undefined;
|
|
29
|
+
logLevel?: "debug" | "info" | "warn" | "error" | undefined;
|
|
30
|
+
allowDMs?: boolean | undefined;
|
|
31
|
+
allowRelationships?: boolean | undefined;
|
|
32
|
+
allowVoice?: boolean | undefined;
|
|
33
|
+
redactContent?: boolean | undefined;
|
|
34
|
+
allowedGuilds?: string[] | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
export type Config = z.infer<typeof configSchema>;
|
|
37
|
+
export declare function loadConfig(): Config;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWhB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,wBAAgB,UAAU,IAAI,MAAM,CAenC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const configSchema = z.object({
|
|
3
|
+
discordToken: z.string().min(1, 'DISCORD_TOKEN is required'),
|
|
4
|
+
dangerMode: z.boolean().default(false),
|
|
5
|
+
maxRetries: z.number().default(3),
|
|
6
|
+
rateLimitConcurrency: z.number().default(3),
|
|
7
|
+
logLevel: z.enum(['debug', 'info', 'warn', 'error']).default('info'),
|
|
8
|
+
allowDMs: z.boolean().default(true),
|
|
9
|
+
allowRelationships: z.boolean().default(false),
|
|
10
|
+
allowVoice: z.boolean().default(true),
|
|
11
|
+
redactContent: z.boolean().default(false),
|
|
12
|
+
allowedGuilds: z.array(z.string()).optional(),
|
|
13
|
+
});
|
|
14
|
+
export function loadConfig() {
|
|
15
|
+
const raw = {
|
|
16
|
+
discordToken: process.env.DISCORD_TOKEN ?? '',
|
|
17
|
+
dangerMode: process.env.DANGER_MODE === 'true',
|
|
18
|
+
maxRetries: parseInt(process.env.MAX_RETRIES ?? '3', 10),
|
|
19
|
+
rateLimitConcurrency: parseInt(process.env.RATE_LIMIT_CONCURRENCY ?? '3', 10),
|
|
20
|
+
logLevel: process.env.LOG_LEVEL ?? 'info',
|
|
21
|
+
allowDMs: process.env.ALLOW_DMS !== 'false',
|
|
22
|
+
allowRelationships: process.env.ALLOW_RELATIONSHIPS === 'true',
|
|
23
|
+
allowVoice: process.env.ALLOW_VOICE !== 'false',
|
|
24
|
+
redactContent: process.env.REDACT_CONTENT === 'true',
|
|
25
|
+
allowedGuilds: process.env.ALLOWED_GUILDS?.split(',').filter(Boolean),
|
|
26
|
+
};
|
|
27
|
+
return configSchema.parse(raw);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,2BAA2B,CAAC;IAC5D,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACtC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC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,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM;QACpD,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;KACtE,CAAC;IAEF,OAAO,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discord-errors.d.ts","sourceRoot":"","sources":["../../../src/core/errors/discord-errors.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAMT,MAAM,iBAAiB,CAAC;AAkBzB,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAsCxD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { DiscordAPIError } from 'discord.js-selfbot-v13';
|
|
2
|
+
import { authError, rateLimitError, forbiddenError, notFoundError, internalError, } from './mcp-errors.js';
|
|
3
|
+
const DISCORD_ERROR_MAP = {
|
|
4
|
+
0: (err) => authError(err.message),
|
|
5
|
+
10003: (err) => notFoundError('Channel', extractId(err)),
|
|
6
|
+
10004: (err) => notFoundError('Guild', extractId(err)),
|
|
7
|
+
10008: (err) => notFoundError('Message', extractId(err)),
|
|
8
|
+
10013: (err) => notFoundError('User', extractId(err)),
|
|
9
|
+
50001: () => forbiddenError('Missing access to this resource'),
|
|
10
|
+
50013: () => forbiddenError('Missing permissions'),
|
|
11
|
+
50035: (err) => ({ code: 'VALIDATION', message: err.message }),
|
|
12
|
+
};
|
|
13
|
+
function extractId(err) {
|
|
14
|
+
const match = err.path?.match(/\d{17,19}/);
|
|
15
|
+
return match?.[0] ?? 'unknown';
|
|
16
|
+
}
|
|
17
|
+
export function mapDiscordError(error) {
|
|
18
|
+
if (error instanceof DiscordAPIError) {
|
|
19
|
+
if (error.httpStatus === 401) {
|
|
20
|
+
return authError();
|
|
21
|
+
}
|
|
22
|
+
if (error.httpStatus === 429) {
|
|
23
|
+
const retryAfter = error.retryAfter ?? 5000;
|
|
24
|
+
return rateLimitError(retryAfter);
|
|
25
|
+
}
|
|
26
|
+
if (error.httpStatus === 403) {
|
|
27
|
+
return forbiddenError(error.message);
|
|
28
|
+
}
|
|
29
|
+
if (error.httpStatus === 404) {
|
|
30
|
+
return notFoundError('Resource', extractId(error));
|
|
31
|
+
}
|
|
32
|
+
const mapper = DISCORD_ERROR_MAP[error.code];
|
|
33
|
+
if (mapper) {
|
|
34
|
+
return mapper(error);
|
|
35
|
+
}
|
|
36
|
+
return internalError(`Discord API error: ${error.message}`, {
|
|
37
|
+
code: error.code,
|
|
38
|
+
httpStatus: error.httpStatus,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
if (error instanceof Error) {
|
|
42
|
+
if (error.message.includes('TOKEN_INVALID') || error.message.includes('invalid token')) {
|
|
43
|
+
return authError();
|
|
44
|
+
}
|
|
45
|
+
return internalError(error.message);
|
|
46
|
+
}
|
|
47
|
+
return internalError('Unknown error occurred');
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=discord-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discord-errors.js","sourceRoot":"","sources":["../../../src/core/errors/discord-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAEL,SAAS,EACT,cAAc,EACd,cAAc,EACd,aAAa,EACb,aAAa,GACd,MAAM,iBAAiB,CAAC;AAEzB,MAAM,iBAAiB,GAAuD;IAC5E,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC;IAClC,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACxD,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,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,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QACrD,CAAC;QAED,MAAM,MAAM,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QAED,OAAO,aAAa,CAAC,sBAAsB,KAAK,CAAC,OAAO,EAAE,EAAE;YAC1D,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAC,CAAC;IACL,CAAC;IAED,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;YACvF,OAAO,SAAS,EAAE,CAAC;QACrB,CAAC;QACD,OAAO,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,aAAa,CAAC,wBAAwB,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type McpErrorCode = 'AUTH_INVALID_TOKEN' | 'RATE_LIMITED' | 'FORBIDDEN' | 'NOT_FOUND' | 'CONFLICT' | 'VALIDATION' | 'FEATURE_DISABLED' | 'INTERNAL';
|
|
2
|
+
export interface McpError {
|
|
3
|
+
code: McpErrorCode;
|
|
4
|
+
message: string;
|
|
5
|
+
details?: Record<string, unknown>;
|
|
6
|
+
retryAfterMs?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function createError(code: McpErrorCode, message: string, details?: Record<string, unknown>, retryAfterMs?: number): McpError;
|
|
9
|
+
export declare function authError(message?: string): McpError;
|
|
10
|
+
export declare function rateLimitError(retryAfterMs: number): McpError;
|
|
11
|
+
export declare function forbiddenError(message: string): McpError;
|
|
12
|
+
export declare function notFoundError(resource: string, id: string): McpError;
|
|
13
|
+
export declare function conflictError(message: string): McpError;
|
|
14
|
+
export declare function validationError(message: string, details?: Record<string, unknown>): McpError;
|
|
15
|
+
export declare function featureDisabledError(feature: string): McpError;
|
|
16
|
+
export declare function internalError(message: string, details?: Record<string, unknown>): McpError;
|
|
17
|
+
//# sourceMappingURL=mcp-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-errors.d.ts","sourceRoot":"","sources":["../../../src/core/errors/mcp-errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,oBAAoB,GACpB,cAAc,GACd,WAAW,GACX,WAAW,GACX,UAAU,GACV,YAAY,GACZ,kBAAkB,GAClB,UAAU,CAAC;AAEf,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,YAAY,CAAC,EAAE,MAAM,GACpB,QAAQ,CAEV;AAED,wBAAgB,SAAS,CAAC,OAAO,SAAqC,GAAG,QAAQ,CAEhF;AAED,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAE7D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAExD;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,QAAQ,CAEpE;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAEvD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ,CAE5F;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAE9D;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ,CAE1F"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export function createError(code, message, details, retryAfterMs) {
|
|
2
|
+
return { code, message, details, retryAfterMs };
|
|
3
|
+
}
|
|
4
|
+
export function authError(message = 'Invalid or expired Discord token') {
|
|
5
|
+
return createError('AUTH_INVALID_TOKEN', message);
|
|
6
|
+
}
|
|
7
|
+
export function rateLimitError(retryAfterMs) {
|
|
8
|
+
return createError('RATE_LIMITED', `Rate limited. Retry after ${retryAfterMs}ms`, undefined, retryAfterMs);
|
|
9
|
+
}
|
|
10
|
+
export function forbiddenError(message) {
|
|
11
|
+
return createError('FORBIDDEN', message);
|
|
12
|
+
}
|
|
13
|
+
export function notFoundError(resource, id) {
|
|
14
|
+
return createError('NOT_FOUND', `${resource} not found: ${id}`, { resource, id });
|
|
15
|
+
}
|
|
16
|
+
export function conflictError(message) {
|
|
17
|
+
return createError('CONFLICT', message);
|
|
18
|
+
}
|
|
19
|
+
export function validationError(message, details) {
|
|
20
|
+
return createError('VALIDATION', message, details);
|
|
21
|
+
}
|
|
22
|
+
export function featureDisabledError(feature) {
|
|
23
|
+
return createError('FEATURE_DISABLED', `Feature disabled: ${feature}. Enable via config.`, { feature });
|
|
24
|
+
}
|
|
25
|
+
export function internalError(message, details) {
|
|
26
|
+
return createError('INTERNAL', message, details);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=mcp-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-errors.js","sourceRoot":"","sources":["../../../src/core/errors/mcp-errors.ts"],"names":[],"mappings":"AAiBA,MAAM,UAAU,WAAW,CACzB,IAAkB,EAClB,OAAe,EACf,OAAiC,EACjC,YAAqB;IAErB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAO,GAAG,kCAAkC;IACpE,OAAO,WAAW,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,YAAoB;IACjD,OAAO,WAAW,CAAC,cAAc,EAAE,6BAA6B,YAAY,IAAI,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;AAC7G,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,OAAO,WAAW,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,QAAgB,EAAE,EAAU;IACxD,OAAO,WAAW,CAAC,WAAW,EAAE,GAAG,QAAQ,eAAe,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,OAAiC;IAChF,OAAO,WAAW,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,OAAO,WAAW,CAAC,kBAAkB,EAAE,qBAAqB,OAAO,sBAAsB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AAC1G,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,OAAiC;IAC9E,OAAO,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/formatting/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/formatting/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { Guild, Channel, Message, User, MessageAttachment, MessageEmbed, VoiceState, ThreadChannel, Role } from 'discord.js-selfbot-v13';
|
|
2
|
+
export interface UserDTO {
|
|
3
|
+
id: string;
|
|
4
|
+
username: string;
|
|
5
|
+
discriminator: string;
|
|
6
|
+
displayName: string | null;
|
|
7
|
+
avatarUrl: string | null;
|
|
8
|
+
bot: boolean;
|
|
9
|
+
system: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface GuildDTO {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
iconUrl: string | null;
|
|
15
|
+
memberCount: number;
|
|
16
|
+
ownerId: string;
|
|
17
|
+
description: string | null;
|
|
18
|
+
features: string[];
|
|
19
|
+
joinedAt: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface ChannelDTO {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string | null;
|
|
24
|
+
type: string;
|
|
25
|
+
guildId: string | null;
|
|
26
|
+
parentId: string | null;
|
|
27
|
+
topic: string | null;
|
|
28
|
+
nsfw: boolean;
|
|
29
|
+
position: number | null;
|
|
30
|
+
}
|
|
31
|
+
export interface AttachmentDTO {
|
|
32
|
+
id: string;
|
|
33
|
+
filename: string;
|
|
34
|
+
url: string;
|
|
35
|
+
size: number;
|
|
36
|
+
contentType: string | null;
|
|
37
|
+
width: number | null;
|
|
38
|
+
height: number | null;
|
|
39
|
+
}
|
|
40
|
+
export interface EmbedDTO {
|
|
41
|
+
title: string | null;
|
|
42
|
+
description: string | null;
|
|
43
|
+
url: string | null;
|
|
44
|
+
color: number | null;
|
|
45
|
+
timestamp: string | null;
|
|
46
|
+
footer: string | null;
|
|
47
|
+
author: string | null;
|
|
48
|
+
}
|
|
49
|
+
export interface MessageDTO {
|
|
50
|
+
id: string;
|
|
51
|
+
channelId: string;
|
|
52
|
+
guildId: string | null;
|
|
53
|
+
author: UserDTO;
|
|
54
|
+
content: string;
|
|
55
|
+
createdAt: string;
|
|
56
|
+
editedAt: string | null;
|
|
57
|
+
pinned: boolean;
|
|
58
|
+
type: string;
|
|
59
|
+
replyTo: string | null;
|
|
60
|
+
attachments: AttachmentDTO[];
|
|
61
|
+
embeds: EmbedDTO[];
|
|
62
|
+
reactions: {
|
|
63
|
+
emoji: string;
|
|
64
|
+
count: number;
|
|
65
|
+
me: boolean;
|
|
66
|
+
}[];
|
|
67
|
+
}
|
|
68
|
+
export interface ThreadDTO {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
parentId: string | null;
|
|
72
|
+
guildId: string | null;
|
|
73
|
+
ownerId: string | null;
|
|
74
|
+
archived: boolean;
|
|
75
|
+
locked: boolean;
|
|
76
|
+
messageCount: number;
|
|
77
|
+
memberCount: number;
|
|
78
|
+
createdAt: string | null;
|
|
79
|
+
}
|
|
80
|
+
export interface VoiceStateDTO {
|
|
81
|
+
channelId: string | null;
|
|
82
|
+
guildId: string | null;
|
|
83
|
+
userId: string;
|
|
84
|
+
mute: boolean;
|
|
85
|
+
deaf: boolean;
|
|
86
|
+
selfMute: boolean;
|
|
87
|
+
selfDeaf: boolean;
|
|
88
|
+
streaming: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface RoleDTO {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
color: number;
|
|
94
|
+
position: number;
|
|
95
|
+
permissions: string;
|
|
96
|
+
mentionable: boolean;
|
|
97
|
+
hoist: boolean;
|
|
98
|
+
}
|
|
99
|
+
export declare function formatUser(user: User): UserDTO;
|
|
100
|
+
export declare function formatGuild(guild: Guild): GuildDTO;
|
|
101
|
+
export declare function formatChannel(channel: Channel): ChannelDTO;
|
|
102
|
+
export declare function formatAttachment(att: MessageAttachment): AttachmentDTO;
|
|
103
|
+
export declare function formatEmbed(embed: MessageEmbed): EmbedDTO;
|
|
104
|
+
export declare function formatMessage(message: Message): MessageDTO;
|
|
105
|
+
export declare function formatThread(thread: ThreadChannel): ThreadDTO;
|
|
106
|
+
export declare function formatVoiceState(state: VoiceState): VoiceStateDTO;
|
|
107
|
+
export declare function formatRole(role: Role): RoleDTO;
|
|
108
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/core/formatting/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,OAAO,EAGP,OAAO,EACP,IAAI,EAEJ,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,aAAa,EACb,IAAI,EACL,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,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,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAU9C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,QAAQ,CAWlD;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAoB1D;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,iBAAiB,GAAG,aAAa,CAUtE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,QAAQ,CAUzD;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAoB1D;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAa7D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,aAAa,CAWjE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAU9C"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
export function formatUser(user) {
|
|
2
|
+
return {
|
|
3
|
+
id: user.id,
|
|
4
|
+
username: user.username,
|
|
5
|
+
discriminator: user.discriminator,
|
|
6
|
+
displayName: user.globalName ?? null,
|
|
7
|
+
avatarUrl: user.displayAvatarURL({ dynamic: true }) ?? null,
|
|
8
|
+
bot: user.bot,
|
|
9
|
+
system: user.system,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export function formatGuild(guild) {
|
|
13
|
+
return {
|
|
14
|
+
id: guild.id,
|
|
15
|
+
name: guild.name,
|
|
16
|
+
iconUrl: guild.iconURL({ dynamic: true }) ?? null,
|
|
17
|
+
memberCount: guild.memberCount,
|
|
18
|
+
ownerId: guild.ownerId,
|
|
19
|
+
description: guild.description,
|
|
20
|
+
features: [...guild.features],
|
|
21
|
+
joinedAt: guild.joinedAt?.toISOString() ?? null,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function formatChannel(channel) {
|
|
25
|
+
const base = {
|
|
26
|
+
id: channel.id,
|
|
27
|
+
type: channel.type,
|
|
28
|
+
guildId: null,
|
|
29
|
+
parentId: null,
|
|
30
|
+
name: null,
|
|
31
|
+
topic: null,
|
|
32
|
+
nsfw: false,
|
|
33
|
+
position: null,
|
|
34
|
+
};
|
|
35
|
+
if ('name' in channel)
|
|
36
|
+
base.name = channel.name;
|
|
37
|
+
if ('guild' in channel)
|
|
38
|
+
base.guildId = channel.guild?.id ?? null;
|
|
39
|
+
if ('parentId' in channel)
|
|
40
|
+
base.parentId = channel.parentId ?? null;
|
|
41
|
+
if ('topic' in channel)
|
|
42
|
+
base.topic = channel.topic ?? null;
|
|
43
|
+
if ('nsfw' in channel)
|
|
44
|
+
base.nsfw = channel.nsfw;
|
|
45
|
+
if ('position' in channel)
|
|
46
|
+
base.position = channel.position ?? null;
|
|
47
|
+
return base;
|
|
48
|
+
}
|
|
49
|
+
export function formatAttachment(att) {
|
|
50
|
+
return {
|
|
51
|
+
id: att.id,
|
|
52
|
+
filename: att.name ?? 'unknown',
|
|
53
|
+
url: att.url,
|
|
54
|
+
size: att.size,
|
|
55
|
+
contentType: att.contentType ?? null,
|
|
56
|
+
width: att.width ?? null,
|
|
57
|
+
height: att.height ?? null,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export function formatEmbed(embed) {
|
|
61
|
+
return {
|
|
62
|
+
title: embed.title ?? null,
|
|
63
|
+
description: embed.description ?? null,
|
|
64
|
+
url: embed.url ?? null,
|
|
65
|
+
color: embed.color ?? null,
|
|
66
|
+
timestamp: embed.timestamp ? new Date(embed.timestamp).toISOString() : null,
|
|
67
|
+
footer: embed.footer?.text ?? null,
|
|
68
|
+
author: embed.author?.name ?? null,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export function formatMessage(message) {
|
|
72
|
+
return {
|
|
73
|
+
id: message.id,
|
|
74
|
+
channelId: message.channelId,
|
|
75
|
+
guildId: message.guildId,
|
|
76
|
+
author: formatUser(message.author),
|
|
77
|
+
content: message.content,
|
|
78
|
+
createdAt: message.createdAt.toISOString(),
|
|
79
|
+
editedAt: message.editedAt?.toISOString() ?? null,
|
|
80
|
+
pinned: message.pinned,
|
|
81
|
+
type: message.type,
|
|
82
|
+
replyTo: message.reference?.messageId ?? null,
|
|
83
|
+
attachments: message.attachments.map((a) => formatAttachment(a)),
|
|
84
|
+
embeds: message.embeds.map((e) => formatEmbed(e)),
|
|
85
|
+
reactions: message.reactions.cache.map((r) => ({
|
|
86
|
+
emoji: r.emoji.toString(),
|
|
87
|
+
count: r.count ?? 0,
|
|
88
|
+
me: r.me,
|
|
89
|
+
})),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export function formatThread(thread) {
|
|
93
|
+
return {
|
|
94
|
+
id: thread.id,
|
|
95
|
+
name: thread.name,
|
|
96
|
+
parentId: thread.parentId,
|
|
97
|
+
guildId: thread.guildId,
|
|
98
|
+
ownerId: thread.ownerId,
|
|
99
|
+
archived: thread.archived ?? false,
|
|
100
|
+
locked: thread.locked ?? false,
|
|
101
|
+
messageCount: thread.messageCount ?? 0,
|
|
102
|
+
memberCount: thread.memberCount ?? 0,
|
|
103
|
+
createdAt: thread.createdAt?.toISOString() ?? null,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export function formatVoiceState(state) {
|
|
107
|
+
return {
|
|
108
|
+
channelId: state.channelId,
|
|
109
|
+
guildId: state.guild?.id ?? null,
|
|
110
|
+
userId: state.id,
|
|
111
|
+
mute: state.mute ?? false,
|
|
112
|
+
deaf: state.deaf ?? false,
|
|
113
|
+
selfMute: state.selfMute ?? false,
|
|
114
|
+
selfDeaf: state.selfDeaf ?? false,
|
|
115
|
+
streaming: state.streaming ?? false,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export function formatRole(role) {
|
|
119
|
+
return {
|
|
120
|
+
id: role.id,
|
|
121
|
+
name: role.name,
|
|
122
|
+
color: role.color,
|
|
123
|
+
position: role.position,
|
|
124
|
+
permissions: role.permissions.bitfield.toString(),
|
|
125
|
+
mentionable: role.mentionable,
|
|
126
|
+
hoist: role.hoist,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../../src/core/formatting/output.ts"],"names":[],"mappings":"AAqHA,MAAM,UAAU,UAAU,CAAC,IAAU;IACnC,OAAO;QACL,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,WAAW,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI;QACpC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,IAAI,IAAI;QAC3D,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAY;IACtC,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,IAAI,IAAI;QACjD,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,QAAQ,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC7B,QAAQ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I,IAAI,KAAK;QACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK;QACjC,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK;QACjC,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAU;IACnC,OAAO;QACL,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,EAAE;QACjD,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,KAAK,EAAE,IAAI,CAAC,KAAK;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
2
|
+
export declare class Logger {
|
|
3
|
+
private level;
|
|
4
|
+
constructor(level?: LogLevel);
|
|
5
|
+
private log;
|
|
6
|
+
debug(message: string, data?: Record<string, unknown>): void;
|
|
7
|
+
info(message: string, data?: Record<string, unknown>): void;
|
|
8
|
+
warn(message: string, data?: Record<string, unknown>): void;
|
|
9
|
+
error(message: string, data?: Record<string, unknown>): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function initLogger(level: LogLevel): Logger;
|
|
12
|
+
export declare function getLogger(): Logger;
|
|
13
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/core/logger.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAS3D,qBAAa,MAAM;IACjB,OAAO,CAAC,KAAK,CAAS;gBAEV,KAAK,GAAE,QAAiB;IAIpC,OAAO,CAAC,GAAG;IAaX,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIrD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIpD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIpD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAGtD;AAID,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAGlD;AAED,wBAAgB,SAAS,IAAI,MAAM,CAKlC"}
|