discord-selfbot-mcp 1.3.0 → 1.4.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 +3 -6
- package/package.json +1 -1
- package/scripts/daemon.py +11 -4
- package/scripts/dcli.py +8 -4
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -9,12 +9,9 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<img src="https://img.shields.io/
|
|
13
|
-
<img src="https://
|
|
14
|
-
<a href="
|
|
15
|
-
<img src="https://img.shields.io/badge/mcp-sdk-orange" alt="mcp">
|
|
16
|
-
<img src="https://img.shields.io/badge/skill-cli-purple" alt="skill">
|
|
17
|
-
<a href="https://github.com/Microck/opencode-studio"><img src="https://img.shields.io/badge/opencode-studio-brown?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABiElEQVR4nF2Sv0tWcRTGPyeVIpCWwmyJGqQagsqCsL2hhobsD3BvdWhoj/6CiIKaoqXBdMjKRWwQgqZ%2BokSvkIhg9BOT9xPn9Vx79cD3cu6953zP8zznCQB1V0S01d3AKeAKcBVYA94DjyJioru2k9SHE%2Bqc%2Bkd9rL7yf7TUm%2BpQ05yPUM%2Bo626Pp%2BqE2q7GGfWrOpjNnWnAOPAGeAK8Bb4U5D3AJ%2BAQsAAMAHfVvl7gIrAf2Kjiz8BZYB3YC/wFpoGDwHfgEnA0oU7tgHiheEShyXxY/Vn/n6ljye8DcBiYAloRcV3tAdrV1xMRG%2Bo94DywCAwmx33AJHASWK7iiAjzNFOBl7WapPYtYdyo8RlLqVpOVPvq9KoH1NUuOneycaRefqnP1ftdUyiOt5KS%2BqLWdDpVzTXMl5It4Jr6u%2BQ/nhyBc8C7jpowGxGvmxuPqT9qyYuFIKdP71B8WT3SOKexXLrntvqxq3BefaiuFMQ0wqZftxl3M78MjBasfiDN/SAi0kFbtf8ACtKBWZBDoJEAAAAASUVORK5CYII%3D" alt="Add with OpenCode Studio" /></a>
|
|
12
|
+
<a href="https://github.com/Microck/discord.py-self-mcp/releases"><img src="https://img.shields.io/github/v/release/Microck/discord.py-self-mcp?display_name=tag&style=flat-square&label=release&color=000000" alt="release"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/discord-selfbot-mcp"><img src="https://flat.badgen.net/npm/dt/discord-selfbot-mcp?label=downloads&color=000000" alt="npm downloads"></a>
|
|
14
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-mit-000000?style=flat-square" alt="license"></a>
|
|
18
15
|
</p>
|
|
19
16
|
|
|
20
17
|
<p align="center">
|
package/package.json
CHANGED
package/scripts/daemon.py
CHANGED
|
@@ -46,7 +46,11 @@ from discord_py_self_mcp.cli_runtime import (
|
|
|
46
46
|
ensure_runtime_dir,
|
|
47
47
|
)
|
|
48
48
|
from discord_py_self_mcp.logging_utils import log_to_stderr
|
|
49
|
-
from discord_py_self_mcp.tool_utils import
|
|
49
|
+
from discord_py_self_mcp.tool_utils import (
|
|
50
|
+
NON_MESSAGEABLE_TEXT,
|
|
51
|
+
build_reply_kwargs,
|
|
52
|
+
validate_message_content,
|
|
53
|
+
)
|
|
50
54
|
from discord_py_self_mcp.tools.embed import serialize_attachment, serialize_message
|
|
51
55
|
|
|
52
56
|
DAEMON_SCRIPT = SCRIPT_DIR / "daemon.py"
|
|
@@ -203,7 +207,9 @@ class DiscordDaemon:
|
|
|
203
207
|
)
|
|
204
208
|
if cmd == "send_message":
|
|
205
209
|
return await self._send_message(
|
|
206
|
-
args.get("channel_id"),
|
|
210
|
+
args.get("channel_id"),
|
|
211
|
+
args.get("content"),
|
|
212
|
+
args.get("reply_to_message_id"),
|
|
207
213
|
)
|
|
208
214
|
if cmd == "get_message_attachments":
|
|
209
215
|
return await self._get_message_attachments(
|
|
@@ -313,7 +319,7 @@ class DiscordDaemon:
|
|
|
313
319
|
messages.reverse()
|
|
314
320
|
return {"messages": messages}
|
|
315
321
|
|
|
316
|
-
async def _send_message(self, channel_id, content):
|
|
322
|
+
async def _send_message(self, channel_id, content, reply_to_message_id=None):
|
|
317
323
|
content_error = validate_message_content(content or "")
|
|
318
324
|
if content_error:
|
|
319
325
|
return {"error": content_error}
|
|
@@ -326,7 +332,8 @@ class DiscordDaemon:
|
|
|
326
332
|
if not isinstance(channel, discord.abc.Messageable):
|
|
327
333
|
return {"error": NON_MESSAGEABLE_TEXT}
|
|
328
334
|
|
|
329
|
-
|
|
335
|
+
send_kwargs = build_reply_kwargs(reply_to_message_id, channel_id)
|
|
336
|
+
message = await channel.send(content, **send_kwargs)
|
|
330
337
|
return {"message_id": message.id, "success": True}
|
|
331
338
|
|
|
332
339
|
async def _get_message_attachments(
|
package/scripts/dcli.py
CHANGED
|
@@ -4,7 +4,7 @@ Usage: python3 dcli.py <command> [args]
|
|
|
4
4
|
|
|
5
5
|
Commands:
|
|
6
6
|
daemon <start|stop|restart|status> - Manage daemon process
|
|
7
|
-
send-message --channel ID --content "msg"
|
|
7
|
+
send-message --channel ID --content "msg" [--reply-to MESSAGE_ID]
|
|
8
8
|
read-messages --channel ID [--limit N] [--after TIME]
|
|
9
9
|
get-message-attachments --channel ID --message ID [--attachment-index N] [--download --output-dir DIR]
|
|
10
10
|
list-guilds
|
|
@@ -244,11 +244,14 @@ def cmd_get_message_attachments(
|
|
|
244
244
|
print(f" {destination}")
|
|
245
245
|
|
|
246
246
|
|
|
247
|
-
def cmd_send_message(channel_id, content):
|
|
247
|
+
def cmd_send_message(channel_id, content, reply_to_message_id=None):
|
|
248
|
+
args = {"channel_id": channel_id, "content": content}
|
|
249
|
+
if reply_to_message_id is not None:
|
|
250
|
+
args["reply_to_message_id"] = reply_to_message_id
|
|
248
251
|
result = send_request(
|
|
249
252
|
{
|
|
250
253
|
"command": "send_message",
|
|
251
|
-
"args":
|
|
254
|
+
"args": args,
|
|
252
255
|
}
|
|
253
256
|
)
|
|
254
257
|
if "error" in result:
|
|
@@ -554,6 +557,7 @@ def main():
|
|
|
554
557
|
send_parser = subparsers.add_parser("send-message", help="Send a message")
|
|
555
558
|
send_parser.add_argument("--channel", "-c", required=True, type=int, help="Channel ID")
|
|
556
559
|
send_parser.add_argument("--content", "-m", required=True, help="Message content")
|
|
560
|
+
send_parser.add_argument("--reply-to", "-r", type=int, default=None, help="Message ID to reply to")
|
|
557
561
|
|
|
558
562
|
read_parser = subparsers.add_parser("read-messages", help="Read messages from channel")
|
|
559
563
|
read_parser.add_argument("--channel", "-c", required=True, type=int, help="Channel ID")
|
|
@@ -635,7 +639,7 @@ def main():
|
|
|
635
639
|
if args.command == "daemon":
|
|
636
640
|
cmd_daemon(args.action)
|
|
637
641
|
elif args.command == "send-message":
|
|
638
|
-
cmd_send_message(args.channel, args.content)
|
|
642
|
+
cmd_send_message(args.channel, args.content, args.reply_to)
|
|
639
643
|
elif args.command == "read-messages":
|
|
640
644
|
cmd_read_messages(args.channel, args.limit, args.after)
|
|
641
645
|
elif args.command == "get-message-attachments":
|
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.
|
|
9
|
+
"version": "1.4.0",
|
|
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.
|
|
16
|
+
"version": "1.4.0",
|
|
17
17
|
"packageArguments": [],
|
|
18
18
|
"environmentVariables": [
|
|
19
19
|
{
|