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
request handler that calls the rest api
Create a scheduled event for a guild
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 |
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)
The Id of the guild
Data for the new scheduled event
Delete a specific scheduled event for a guild
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 |
const client = new SnowTransfer("TOKEN")
client.guildScheduledEvent.deleteGuildScheduledEvent(guildId, eventId)
The Id of the guild
The Id of the event
Edit the details of a scheduled event for a guild
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 |
// 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" })
The Id of the guild
The Id of the event
Edited scheduled event data
Get a specific scheduled event for a guild
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | if entity_type is STAGE_INSTANCE or VOICE |
const client = new SnowTransfer("TOKEN")
const event = await client.guildScheduledEvent.getGuildScheduledEvent(guildId, eventId)
The Id of the guild
The Id of the event
Optional
withCount: booleanInclude number of users subscribed to this event
Get a list of users attending a specific event
An array of event users
Permissions needed | Condition |
---|---|
VIEW_CHANNEL | if entity_type is STAGE_INSTANCE or VOICE |
const client = new SnowTransfer("TOKEN")
const users = await client.guildScheduledEvent.getGuildScheduledEventUsers(guildId, eventId)
The Id of the guild
The Id of the event
Optional
query: GetGuildScheduledEventUsersGet all scheduled events for a guild
An array of guild scheduled events
const client = new SnowTransfer("TOKEN")
const events = await client.guildScheduledEvent.listGuildScheduledEvents(guildId)
The Id of the guild
Optional
withCounts: booleanInclude number of users subscribed to each event
Generated using TypeDoc
Methods for interacting with Guild Scheduled Events