Class GuildScheduledEventMethods

Methods for interacting with Guild Scheduled Events

Hierarchy

  • GuildScheduledEventMethods

Constructors

  • Create a new Guild Scheduled Event Method Handler

    Usually SnowTransfer creates a method handler for you, this is here for completion

    You can access the methods listed via client.guildScheduledEvent.method, where client is an initialized SnowTransfer instance

    Parameters

    • requestHandler: RequestHandler

      request handler that calls the rest api

    Returns GuildScheduledEventMethods

Methods

  • Create a scheduled event for a guild

    Returns

    A scheduled event

    Permissions needed Condition
    MANAGE_EVENTS always
    MANAGE_CHANNELS If entity_type is STAGE_INSTANCE
    MUTE_MEMBERS If entity_type is STAGE_INSTANCE
    MOVE_MEMBERS If entity_type is STAGE_INSTANCE
    VIEW_CHANNEL If entity_type is VOICE
    CONNECT If entity_type is VOICE

    Example

    const client = new SnowTransfer("TOKEN")
    const eventData = {
    name: "My event!",
    entity_type: 1,
    start_time: "2020-01-01T00:00:00Z",
    privacy_level: 1
    }
    const event = await client.guildScheduledEvent.createGuildScheduledEvent(guildId, eventData)

    Parameters

    Returns Promise<GuildScheduledEvent>

  • Delete a specific scheduled event for a guild

    Returns

    Resolves the promise on successful execution

    Permissions needed Condition
    MANAGE_EVENTS always
    MANAGE_CHANNELS If entity_type is STAGE_INSTANCE
    MUTE_MEMBERS If entity_type is STAGE_INSTANCE
    MOVE_MEMBERS If entity_type is STAGE_INSTANCE
    VIEW_CHANNEL If entity_type is VOICE
    CONNECT If entity_type is VOICE

    Example

    const client = new SnowTransfer("TOKEN")
    client.guildScheduledEvent.deleteGuildScheduledEvent(guildId, eventId)

    Parameters

    • guildId: string

      The Id of the guild

    • eventId: string

      The Id of the event

    Returns Promise<void>

  • Edit the details of a scheduled event for a guild

    Returns

    A scheduled event

    Permissions needed Condition
    MANAGE_EVENTS always
    MANAGE_CHANNELS If entity_type is STAGE_INSTANCE
    MUTE_MEMBERS If entity_type is STAGE_INSTANCE
    MOVE_MEMBERS If entity_type is STAGE_INSTANCE
    VIEW_CHANNEL If entity_type is VOICE
    CONNECT If entity_type is VOICE

    Example

    // Updates a scheduled event to be an external event that will take place in Brazil and end in 2025
    const client = new SnowTransfer("TOKEN")
    const event = await client.guildScheduledEvent.editGuildScheduledEvent(guildId, eventId, { entity_type: 3, channel_id: null, entity_metadata: { location: "Brazil" }, scheduled_end_time: "2025-01-01T00:00:00.000Z" })

    Parameters

    • guildId: string

      The Id of the guild

    • eventId: string

      The Id of the event

    • data: EditGuildScheduledEventData

      Edited scheduled event data

    Returns Promise<GuildScheduledEvent>

  • Get a specific scheduled event for a guild

    Returns

    A scheduled event

    Permissions needed Condition
    VIEW_CHANNEL if entity_type is STAGE_INSTANCE or VOICE

    Example

    const client = new SnowTransfer("TOKEN")
    const event = await client.guildScheduledEvent.getGuildScheduledEvent(guildId, eventId)

    Parameters

    • guildId: string

      The Id of the guild

    • eventId: string

      The Id of the event

    • Optional withCount: boolean

      Include number of users subscribed to this event

    Returns Promise<GuildScheduledEvent>

  • Get a list of users attending a specific event

    Returns

    An array of event users

    Permissions needed Condition
    VIEW_CHANNEL if entity_type is STAGE_INSTANCE or VOICE

    Example

    const client = new SnowTransfer("TOKEN")
    const users = await client.guildScheduledEvent.getGuildScheduledEventUsers(guildId, eventId)

    Parameters

    Returns Promise<(GuildScheduledEventUser & {
        member?: Member;
    })[]>

  • Get all scheduled events for a guild

    Returns

    An array of guild scheduled events

    Example

    const client = new SnowTransfer("TOKEN")
    const events = await client.guildScheduledEvent.listGuildScheduledEvents(guildId)

    Parameters

    • guildId: string

      The Id of the guild

    • Optional withCounts: boolean

      Include number of users subscribed to each event

    Returns Promise<GuildScheduledEvent[]>

Properties

requestHandler: RequestHandler

Generated using TypeDoc