hikari.scheduled_events#

Application and entities that are used to describe guild scheduled events on Discord.

Module Contents#

class hikari.scheduled_events.EventPrivacyLevel[source]#

Bases: int, hikari.internal.enums.Enum

Enum of the possible scheduled event privacy levels.

GUILD_ONLY = 2[source]#

The scheduled event is only available to guild members.

class hikari.scheduled_events.ScheduledEventType[source]#

Bases: int, hikari.internal.enums.Enum

Enum of the scheduled event types.

STAGE_INSTANCE = 1[source]#

A scheduled stage instance.

VOICE = 2[source]#

A scheculed voice chat event.

EXTERNAL = 3[source]#

A scheduled event which takes part outside of Discord.

class hikari.scheduled_events.ScheduledEventStatus[source]#

Bases: int, hikari.internal.enums.Enum

Enum of the scheduled event statuses.

SCHEDULED = 1[source]#

Indicates that the scheduled event hasn’t occurred yet.

ACTIVE = 2[source]#

Indicates an eventis on-going.

COMPLETED = 3[source]#

Indicates an event has finished.

CANCELED = 4[source]#

Indicates an event has been canceled.

CANCELLED[source]#

Alias of ScheduledEventStatus.CANCELED.

class hikari.scheduled_events.ScheduledEvent[source]#

Bases: hikari.snowflakes.Unique

Base class for scheduled events.

property image_url: Optional[hikari.files.URL][source]#

Cover image for this scheduled event, if set.

app: hikari.traits.RESTAware[source]#

Client application that models may use for procedures.

id: hikari.snowflakes.Snowflake[source]#

ID of the scheduled event.

guild_id: hikari.snowflakes.Snowflake[source]#

ID of the guild this scheduled event belongs to.

name: str[source]#

Name of the scheduled event.

description: Optional[str][source]#

Description of the scheduled event.

start_time: datetime.datetime[source]#

When the event is scheduled to start.

end_time: Optional[datetime.datetime][source]#

When the event is scheduled to end, if set.

privacy_level: EventPrivacyLevel[source]#

Privacy level of the scheduled event.

This restricts who can view and join the scheduled event.

status: ScheduledEventStatus[source]#

Status of the scheduled event.

entity_type: ScheduledEventType[source]#

The type of entity this scheduled event is associated with.

creator: Optional[hikari.users.User][source]#

The user who created the scheduled event.

This will only be set for event created after 2021-10-25.

user_count: Optional[int][source]#

The number of users that have subscribed to the event.

This will be None on gateway events when creating and editing a scheduled event.

image_hash: Optional[str][source]#

Hash of the image used for the scheduled event, if set.

make_image_url(*, ext='png', size=4096)[source]#

Generate the cover image for this scheduled event, if set.

Parameters
extstr

The extension to use for this URL, defaults to png. Supports png, jpeg, jpg and webp.

sizeint

The size to set for the URL, defaults to 4096. Can be any power of two between 16 and 4096.

Returns
typing.Optional[hikari.files.URL]

The URL, or None if no cover image is set.

Raises
ValueError

If size is not a power of two between 16 and 4096 (inclusive).

class hikari.scheduled_events.ScheduledExternalEvent[source]#

Bases: ScheduledEvent

A scheduled event that takes place outside of Discord.

location: str[source]#

The location of the scheduled event.

Note

There is no strict format for this field, and it will likely be a user friendly string.

end_time: datetime.datetime[source]#

When the event is scheduled to end.

class hikari.scheduled_events.ScheduledStageEvent[source]#

Bases: ScheduledEvent

A scheduled event that takes place in a stage channel.

channel_id: hikari.snowflakes.Snowflake[source]#

ID of the stage channel this event is scheduled in.

class hikari.scheduled_events.ScheduledVoiceEvent[source]#

Bases: ScheduledEvent

A scheduled event that takes place in a voice channel.

channel_id: hikari.snowflakes.Snowflake[source]#

ID of the voice channel this scheduled event is in.

class hikari.scheduled_events.ScheduledEventUser[source]#

A user who is subscribed to a scheduled event.

event_id: hikari.snowflakes.Snowflake[source]#

ID of the scheduled event they’re subscribed to.

user: hikari.users.User[source]#

Object representing the user.

member: Optional[hikari.guilds.Member][source]#

Their guild member object if they’re in the event’s guild.