@mahesvara/discord-mcpserver 1.0.8 → 1.0.9
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/dist/index.js +4 -2833
- package/dist/schemas/channel.d.ts +158 -0
- package/dist/schemas/channel.js +128 -0
- package/dist/schemas/common.d.ts +23 -0
- package/dist/schemas/common.js +71 -0
- package/dist/schemas/community.d.ts +181 -0
- package/dist/schemas/community.js +60 -0
- package/dist/schemas/emoji.d.ts +59 -0
- package/dist/schemas/emoji.js +29 -0
- package/dist/schemas/event.d.ts +62 -0
- package/dist/schemas/event.js +33 -0
- package/dist/schemas/guild.d.ts +85 -0
- package/dist/schemas/guild.js +42 -0
- package/dist/schemas/index.d.ts +12 -855
- package/dist/schemas/index.js +13 -617
- package/dist/schemas/invite.d.ts +40 -0
- package/dist/schemas/invite.js +32 -0
- package/dist/schemas/member.d.ts +60 -0
- package/dist/schemas/member.js +33 -0
- package/dist/schemas/message.d.ts +121 -0
- package/dist/schemas/message.js +61 -0
- package/dist/schemas/moderation.d.ts +343 -0
- package/dist/schemas/moderation.js +152 -0
- package/dist/schemas/role.d.ts +126 -0
- package/dist/schemas/role.js +73 -0
- package/dist/schemas/webhook.d.ts +51 -0
- package/dist/schemas/webhook.js +33 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +6 -0
- package/dist/tools/channel.d.ts +2 -0
- package/dist/tools/channel.js +510 -0
- package/dist/tools/community.d.ts +2 -0
- package/dist/tools/community.js +259 -0
- package/dist/tools/emoji.d.ts +2 -0
- package/dist/tools/emoji.js +247 -0
- package/dist/tools/event.d.ts +2 -0
- package/dist/tools/event.js +170 -0
- package/dist/tools/guild.d.ts +2 -0
- package/dist/tools/guild.js +198 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +24 -0
- package/dist/tools/invite.d.ts +2 -0
- package/dist/tools/invite.js +143 -0
- package/dist/tools/member.d.ts +2 -0
- package/dist/tools/member.js +200 -0
- package/dist/tools/message.d.ts +2 -0
- package/dist/tools/message.js +386 -0
- package/dist/tools/moderation.d.ts +2 -0
- package/dist/tools/moderation.js +641 -0
- package/dist/tools/role.d.ts +2 -0
- package/dist/tools/role.js +420 -0
- package/dist/tools/webhook.d.ts +2 -0
- package/dist/tools/webhook.js +199 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { GuildIdSchema, EmojiIdSchema, StickerIdSchema, ResponseFormatSchema } from "./common.js";
|
|
3
|
+
export const ListEmojisSchema = z.object({
|
|
4
|
+
guild_id: GuildIdSchema,
|
|
5
|
+
response_format: ResponseFormatSchema
|
|
6
|
+
}).strict();
|
|
7
|
+
export const CreateEmojiSchema = z.object({
|
|
8
|
+
guild_id: GuildIdSchema,
|
|
9
|
+
name: z.string()
|
|
10
|
+
.min(2)
|
|
11
|
+
.max(32)
|
|
12
|
+
.regex(/^[a-zA-Z0-9_]+$/, "Emoji name must be alphanumeric with underscores")
|
|
13
|
+
.describe("Emoji name (2-32 alphanumeric characters)"),
|
|
14
|
+
image_url: z.string()
|
|
15
|
+
.url()
|
|
16
|
+
.describe("URL of the image to use for the emoji")
|
|
17
|
+
}).strict();
|
|
18
|
+
export const DeleteEmojiSchema = z.object({
|
|
19
|
+
guild_id: GuildIdSchema,
|
|
20
|
+
emoji_id: EmojiIdSchema
|
|
21
|
+
}).strict();
|
|
22
|
+
export const ListStickersSchema = z.object({
|
|
23
|
+
guild_id: GuildIdSchema,
|
|
24
|
+
response_format: ResponseFormatSchema
|
|
25
|
+
}).strict();
|
|
26
|
+
export const DeleteStickerSchema = z.object({
|
|
27
|
+
guild_id: GuildIdSchema,
|
|
28
|
+
sticker_id: StickerIdSchema
|
|
29
|
+
}).strict();
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ListEventsSchema: z.ZodObject<{
|
|
3
|
+
guild_id: z.ZodString;
|
|
4
|
+
response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
|
|
5
|
+
}, "strict", z.ZodTypeAny, {
|
|
6
|
+
response_format: import("../types.js").ResponseFormat;
|
|
7
|
+
guild_id: string;
|
|
8
|
+
}, {
|
|
9
|
+
guild_id: string;
|
|
10
|
+
response_format?: import("../types.js").ResponseFormat | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const CreateEventSchema: z.ZodObject<{
|
|
13
|
+
guild_id: z.ZodString;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
description: z.ZodOptional<z.ZodString>;
|
|
16
|
+
scheduled_start_time: z.ZodString;
|
|
17
|
+
scheduled_end_time: z.ZodOptional<z.ZodString>;
|
|
18
|
+
entity_type: z.ZodEnum<["stage", "voice", "external"]>;
|
|
19
|
+
channel_id: z.ZodOptional<z.ZodString>;
|
|
20
|
+
entity_metadata: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
location: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
location?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
location?: string | undefined;
|
|
26
|
+
}>>;
|
|
27
|
+
}, "strict", z.ZodTypeAny, {
|
|
28
|
+
name: string;
|
|
29
|
+
guild_id: string;
|
|
30
|
+
scheduled_start_time: string;
|
|
31
|
+
entity_type: "voice" | "stage" | "external";
|
|
32
|
+
description?: string | undefined;
|
|
33
|
+
channel_id?: string | undefined;
|
|
34
|
+
scheduled_end_time?: string | undefined;
|
|
35
|
+
entity_metadata?: {
|
|
36
|
+
location?: string | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
name: string;
|
|
40
|
+
guild_id: string;
|
|
41
|
+
scheduled_start_time: string;
|
|
42
|
+
entity_type: "voice" | "stage" | "external";
|
|
43
|
+
description?: string | undefined;
|
|
44
|
+
channel_id?: string | undefined;
|
|
45
|
+
scheduled_end_time?: string | undefined;
|
|
46
|
+
entity_metadata?: {
|
|
47
|
+
location?: string | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const DeleteEventSchema: z.ZodObject<{
|
|
51
|
+
guild_id: z.ZodString;
|
|
52
|
+
event_id: z.ZodString;
|
|
53
|
+
}, "strict", z.ZodTypeAny, {
|
|
54
|
+
guild_id: string;
|
|
55
|
+
event_id: string;
|
|
56
|
+
}, {
|
|
57
|
+
guild_id: string;
|
|
58
|
+
event_id: string;
|
|
59
|
+
}>;
|
|
60
|
+
export type ListEventsInput = z.infer<typeof ListEventsSchema>;
|
|
61
|
+
export type CreateEventInput = z.infer<typeof CreateEventSchema>;
|
|
62
|
+
export type DeleteEventInput = z.infer<typeof DeleteEventSchema>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { GuildIdSchema, ChannelIdSchema, EventIdSchema, ResponseFormatSchema } from "./common.js";
|
|
3
|
+
export const ListEventsSchema = z.object({
|
|
4
|
+
guild_id: GuildIdSchema,
|
|
5
|
+
response_format: ResponseFormatSchema
|
|
6
|
+
}).strict();
|
|
7
|
+
export const CreateEventSchema = z.object({
|
|
8
|
+
guild_id: GuildIdSchema,
|
|
9
|
+
name: z.string()
|
|
10
|
+
.min(1)
|
|
11
|
+
.max(100)
|
|
12
|
+
.describe("Event name"),
|
|
13
|
+
description: z.string()
|
|
14
|
+
.max(1000)
|
|
15
|
+
.optional()
|
|
16
|
+
.describe("Event description"),
|
|
17
|
+
scheduled_start_time: z.string()
|
|
18
|
+
.describe("ISO8601 timestamp for event start"),
|
|
19
|
+
scheduled_end_time: z.string()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("ISO8601 timestamp for event end (required for external events)"),
|
|
22
|
+
entity_type: z.enum(["stage", "voice", "external"])
|
|
23
|
+
.describe("Event type: stage instance, voice channel, or external location"),
|
|
24
|
+
channel_id: ChannelIdSchema.optional()
|
|
25
|
+
.describe("Channel ID for stage/voice events"),
|
|
26
|
+
entity_metadata: z.object({
|
|
27
|
+
location: z.string().max(100).optional()
|
|
28
|
+
}).optional().describe("Metadata for external events (location)")
|
|
29
|
+
}).strict();
|
|
30
|
+
export const DeleteEventSchema = z.object({
|
|
31
|
+
guild_id: GuildIdSchema,
|
|
32
|
+
event_id: EventIdSchema
|
|
33
|
+
}).strict();
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ListGuildsSchema: z.ZodObject<{
|
|
3
|
+
response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
|
|
4
|
+
}, "strict", z.ZodTypeAny, {
|
|
5
|
+
response_format: import("../types.js").ResponseFormat;
|
|
6
|
+
}, {
|
|
7
|
+
response_format?: import("../types.js").ResponseFormat | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const GetGuildSchema: z.ZodObject<{
|
|
10
|
+
guild_id: z.ZodString;
|
|
11
|
+
response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
|
|
12
|
+
}, "strict", z.ZodTypeAny, {
|
|
13
|
+
response_format: import("../types.js").ResponseFormat;
|
|
14
|
+
guild_id: string;
|
|
15
|
+
}, {
|
|
16
|
+
guild_id: string;
|
|
17
|
+
response_format?: import("../types.js").ResponseFormat | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const LeaveGuildSchema: z.ZodObject<{
|
|
20
|
+
guild_id: z.ZodString;
|
|
21
|
+
confirm: z.ZodBoolean;
|
|
22
|
+
}, "strict", z.ZodTypeAny, {
|
|
23
|
+
guild_id: string;
|
|
24
|
+
confirm: boolean;
|
|
25
|
+
}, {
|
|
26
|
+
guild_id: string;
|
|
27
|
+
confirm: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const EditGuildSchema: z.ZodObject<{
|
|
30
|
+
guild_id: z.ZodString;
|
|
31
|
+
name: z.ZodOptional<z.ZodString>;
|
|
32
|
+
verification_level: z.ZodOptional<z.ZodEnum<["none", "low", "medium", "high", "very_high"]>>;
|
|
33
|
+
default_notifications: z.ZodOptional<z.ZodEnum<["all_messages", "only_mentions"]>>;
|
|
34
|
+
afk_channel_id: z.ZodOptional<z.ZodString>;
|
|
35
|
+
afk_timeout: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
system_channel_id: z.ZodOptional<z.ZodString>;
|
|
37
|
+
system_channel_flags: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
suppress_join_notifications: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
suppress_premium_subscriptions: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
suppress_guild_reminder_notifications: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
suppress_join_notification_replies: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
suppress_join_notifications?: boolean | undefined;
|
|
44
|
+
suppress_premium_subscriptions?: boolean | undefined;
|
|
45
|
+
suppress_guild_reminder_notifications?: boolean | undefined;
|
|
46
|
+
suppress_join_notification_replies?: boolean | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
suppress_join_notifications?: boolean | undefined;
|
|
49
|
+
suppress_premium_subscriptions?: boolean | undefined;
|
|
50
|
+
suppress_guild_reminder_notifications?: boolean | undefined;
|
|
51
|
+
suppress_join_notification_replies?: boolean | undefined;
|
|
52
|
+
}>>;
|
|
53
|
+
}, "strict", z.ZodTypeAny, {
|
|
54
|
+
guild_id: string;
|
|
55
|
+
name?: string | undefined;
|
|
56
|
+
verification_level?: "none" | "low" | "medium" | "high" | "very_high" | undefined;
|
|
57
|
+
default_notifications?: "all_messages" | "only_mentions" | undefined;
|
|
58
|
+
afk_channel_id?: string | undefined;
|
|
59
|
+
afk_timeout?: number | undefined;
|
|
60
|
+
system_channel_id?: string | undefined;
|
|
61
|
+
system_channel_flags?: {
|
|
62
|
+
suppress_join_notifications?: boolean | undefined;
|
|
63
|
+
suppress_premium_subscriptions?: boolean | undefined;
|
|
64
|
+
suppress_guild_reminder_notifications?: boolean | undefined;
|
|
65
|
+
suppress_join_notification_replies?: boolean | undefined;
|
|
66
|
+
} | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
guild_id: string;
|
|
69
|
+
name?: string | undefined;
|
|
70
|
+
verification_level?: "none" | "low" | "medium" | "high" | "very_high" | undefined;
|
|
71
|
+
default_notifications?: "all_messages" | "only_mentions" | undefined;
|
|
72
|
+
afk_channel_id?: string | undefined;
|
|
73
|
+
afk_timeout?: number | undefined;
|
|
74
|
+
system_channel_id?: string | undefined;
|
|
75
|
+
system_channel_flags?: {
|
|
76
|
+
suppress_join_notifications?: boolean | undefined;
|
|
77
|
+
suppress_premium_subscriptions?: boolean | undefined;
|
|
78
|
+
suppress_guild_reminder_notifications?: boolean | undefined;
|
|
79
|
+
suppress_join_notification_replies?: boolean | undefined;
|
|
80
|
+
} | undefined;
|
|
81
|
+
}>;
|
|
82
|
+
export type ListGuildsInput = z.infer<typeof ListGuildsSchema>;
|
|
83
|
+
export type GetGuildInput = z.infer<typeof GetGuildSchema>;
|
|
84
|
+
export type LeaveGuildInput = z.infer<typeof LeaveGuildSchema>;
|
|
85
|
+
export type EditGuildInput = z.infer<typeof EditGuildSchema>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { GuildIdSchema, ChannelIdSchema, ResponseFormatSchema } from "./common.js";
|
|
3
|
+
export const ListGuildsSchema = z.object({
|
|
4
|
+
response_format: ResponseFormatSchema
|
|
5
|
+
}).strict();
|
|
6
|
+
export const GetGuildSchema = z.object({
|
|
7
|
+
guild_id: GuildIdSchema,
|
|
8
|
+
response_format: ResponseFormatSchema
|
|
9
|
+
}).strict();
|
|
10
|
+
export const LeaveGuildSchema = z.object({
|
|
11
|
+
guild_id: GuildIdSchema,
|
|
12
|
+
confirm: z.boolean()
|
|
13
|
+
.describe("Must be set to true to confirm leaving the server")
|
|
14
|
+
}).strict();
|
|
15
|
+
export const EditGuildSchema = z.object({
|
|
16
|
+
guild_id: GuildIdSchema,
|
|
17
|
+
name: z.string()
|
|
18
|
+
.min(2)
|
|
19
|
+
.max(100)
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("New server name"),
|
|
22
|
+
verification_level: z.enum(["none", "low", "medium", "high", "very_high"])
|
|
23
|
+
.optional()
|
|
24
|
+
.describe("Verification level required for members"),
|
|
25
|
+
default_notifications: z.enum(["all_messages", "only_mentions"])
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("Default notification settings for new members"),
|
|
28
|
+
afk_channel_id: ChannelIdSchema.optional()
|
|
29
|
+
.describe("AFK voice channel ID"),
|
|
30
|
+
afk_timeout: z.number()
|
|
31
|
+
.int()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("AFK timeout in seconds (60, 300, 900, 1800, 3600)"),
|
|
34
|
+
system_channel_id: ChannelIdSchema.optional()
|
|
35
|
+
.describe("System messages channel ID"),
|
|
36
|
+
system_channel_flags: z.object({
|
|
37
|
+
suppress_join_notifications: z.boolean().optional(),
|
|
38
|
+
suppress_premium_subscriptions: z.boolean().optional(),
|
|
39
|
+
suppress_guild_reminder_notifications: z.boolean().optional(),
|
|
40
|
+
suppress_join_notification_replies: z.boolean().optional()
|
|
41
|
+
}).optional().describe("System channel behavior flags")
|
|
42
|
+
}).strict();
|