Skip to main content
Glama

get_event_subscribers

Retrieve users subscribed to a scheduled Discord event by providing guild and event IDs. Manage event attendance and participant lists.

Instructions

Get users subscribed to a scheduled event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guildIdYesThe ID of the server (guild)
eventIdYesThe ID of the event
limitNoMax users to fetch (default 100)

Implementation Reference

  • The complete inline definition of the 'get_event_subscribers' tool: registration via server.tool, Zod input schema (guildId, eventId, optional limit), and handler logic that uses Discord client to fetch guild event subscribers (up to limit, with member info) and returns JSON.
    server.tool( 'get_event_subscribers', 'Get users subscribed to a scheduled event', { guildId: z.string().describe('The ID of the server (guild)'), eventId: z.string().describe('The ID of the event'), limit: z.number().optional().describe('Max users to fetch (default 100)'), }, async ({ guildId, eventId, limit = 100 }) => { const result = await withErrorHandling(async () => { const client = await getDiscordClient(); const guild = await client.guilds.fetch(guildId); const event = await guild.scheduledEvents.fetch(eventId); const subscribers = await event.fetchSubscribers({ limit, withMember: true }); return subscribers.map((sub) => ({ id: sub.user.id, username: sub.user.username, member: sub.member ? { nickname: sub.member.nickname, joinedAt: sub.member.joinedAt?.toISOString(), } : null, })); }); if (!result.success) { return { content: [{ type: 'text', text: result.error }], isError: true }; } return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] }; } ); }
  • src/index.ts:62-62 (registration)
    Registers all event tools, including 'get_event_subscribers', by calling registerEventTools(server) from event-tools.ts.
    registerEventTools(server);
  • src/index.ts:20-20 (registration)
    Imports the registerEventTools function that defines and registers the 'get_event_subscribers' tool.
    import { registerEventTools } from './tools/event-tools.js';

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scarecr0w12/discord-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server