discord-selfbot-mcp 1.2.3 → 1.2.5
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 +6 -1
- package/package.json +1 -1
- package/scripts/daemon.py +3 -12
- package/scripts/dcli.py +13 -0
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -184,7 +184,7 @@ powered by the robust `discord.py-self` library.
|
|
|
184
184
|
| category | tools | description |
|
|
185
185
|
|----------|-------|-------------|
|
|
186
186
|
| **system** | 2 | get_user_info, list_guilds |
|
|
187
|
-
| **messages** |
|
|
187
|
+
| **messages** | 6 | send_message, read_messages, search_messages, edit_message, delete_message, get_message_attachments |
|
|
188
188
|
| **channels** | 3 | create_channel, delete_channel, list_channels |
|
|
189
189
|
| **voice** | 2 | join_voice_channel, leave_voice_channel |
|
|
190
190
|
| **relationships** | 4 | list_friends, send_friend_request, add_friend, remove_friend |
|
|
@@ -231,6 +231,11 @@ Optional env var:
|
|
|
231
231
|
|
|
232
232
|
- `DISCRAWL_BIN` - custom path to discrawl executable. This overrides the default fork-first lookup.
|
|
233
233
|
|
|
234
|
+
### attachment access
|
|
235
|
+
|
|
236
|
+
Use `get_message_attachments` when a message contains files or images you need to inspect directly.
|
|
237
|
+
It returns attachment metadata for the target message and can stream image/file content back through MCP outputs.
|
|
238
|
+
|
|
234
239
|
### comparison
|
|
235
240
|
|
|
236
241
|
| feature | discord-py-self-mcp | discord.py-self (Lib) | Maol-1997 | codebyyassine | elyxlz |
|
package/package.json
CHANGED
package/scripts/daemon.py
CHANGED
|
@@ -36,6 +36,7 @@ if not TOKEN:
|
|
|
36
36
|
sys.exit(1)
|
|
37
37
|
|
|
38
38
|
import discord
|
|
39
|
+
from discord_py_self_mcp.tools.embed import serialize_message
|
|
39
40
|
|
|
40
41
|
# Configuration
|
|
41
42
|
PID_FILE = Path("/tmp/discord-cli-daemon.pid")
|
|
@@ -238,12 +239,7 @@ class DiscordDaemon:
|
|
|
238
239
|
kwargs["after"] = after_dt
|
|
239
240
|
|
|
240
241
|
async for msg in channel.history(**kwargs):
|
|
241
|
-
messages.append(
|
|
242
|
-
"id": msg.id,
|
|
243
|
-
"author": msg.author.name if msg.author else "Unknown",
|
|
244
|
-
"content": msg.clean_content if msg.clean_content else msg.content,
|
|
245
|
-
"created_at": msg.created_at.isoformat()
|
|
246
|
-
})
|
|
242
|
+
messages.append(serialize_message(msg))
|
|
247
243
|
messages.reverse()
|
|
248
244
|
return {"messages": messages}
|
|
249
245
|
|
|
@@ -287,12 +283,7 @@ class DiscordDaemon:
|
|
|
287
283
|
kwargs["after"] = after_dt
|
|
288
284
|
|
|
289
285
|
async for msg in thread.history(**kwargs):
|
|
290
|
-
messages.append(
|
|
291
|
-
"id": msg.id,
|
|
292
|
-
"author": msg.author.name if msg.author else "Unknown",
|
|
293
|
-
"content": msg.content,
|
|
294
|
-
"created_at": msg.created_at.isoformat()
|
|
295
|
-
})
|
|
286
|
+
messages.append(serialize_message(msg))
|
|
296
287
|
messages.reverse()
|
|
297
288
|
return {"messages": messages, "thread_name": thread.name}
|
|
298
289
|
|
package/scripts/dcli.py
CHANGED
|
@@ -128,6 +128,7 @@ def format_messages(messages, reverse=True, use_local_timezone=True):
|
|
|
128
128
|
for msg in messages:
|
|
129
129
|
author = msg.get("author", "Unknown")
|
|
130
130
|
content = msg.get("content", "") if msg.get("content") else "[No content]"
|
|
131
|
+
attachments = msg.get("attachments", [])
|
|
131
132
|
created_at = msg.get("created_at", "")
|
|
132
133
|
if created_at:
|
|
133
134
|
# Parse ISO format and convert to local timezone
|
|
@@ -138,6 +139,18 @@ def format_messages(messages, reverse=True, use_local_timezone=True):
|
|
|
138
139
|
created_at = dt.strftime('%Y-%m-%d %H:%M')
|
|
139
140
|
except Exception:
|
|
140
141
|
pass
|
|
142
|
+
if attachments:
|
|
143
|
+
attachment_lines = []
|
|
144
|
+
for index, attachment in enumerate(attachments):
|
|
145
|
+
details = [f"[Attachment {index}] {attachment.get('filename', 'unknown')}"]
|
|
146
|
+
if attachment.get("content_type"):
|
|
147
|
+
details.append(f"type={attachment['content_type']}")
|
|
148
|
+
if attachment.get("size") is not None:
|
|
149
|
+
details.append(f"size={attachment['size']}")
|
|
150
|
+
if attachment.get("url"):
|
|
151
|
+
details.append(f"url={attachment['url']}")
|
|
152
|
+
attachment_lines.append(" ".join(details))
|
|
153
|
+
content = f"{content}\n " + "\n ".join(attachment_lines)
|
|
141
154
|
print(f"[{created_at}] {author}: {content}")
|
|
142
155
|
|
|
143
156
|
|
package/server.json
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
"url": "https://github.com/Microck/discord.py-self-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "1.2.
|
|
9
|
+
"version": "1.2.5",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
14
14
|
"identifier": "discord-selfbot-mcp",
|
|
15
15
|
"runtimeHint": "python",
|
|
16
|
-
"version": "1.2.
|
|
16
|
+
"version": "1.2.5",
|
|
17
17
|
"packageArguments": [],
|
|
18
18
|
"environmentVariables": [
|
|
19
19
|
{
|