Skip to content

hikari.scheduled_events#

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

EventPrivacyLevel #

Bases: int, Enum

Enum of the possible scheduled event privacy levels.

GUILD_ONLY class-attribute instance-attribute #

GUILD_ONLY = 2

The scheduled event is only available to guild members.

name property #

name: str

Return the name of the enum member as a str.

value property #

value

Return the value of the enum member.

ScheduledEvent #

Bases: Unique

Base class for scheduled events.

app class-attribute instance-attribute #

app: RESTAware = field(
    repr=False, eq=False, hash=False, metadata={SKIP_DEEP_COPY: True}
)

Client application that models may use for procedures.

created_at property #

created_at: datetime

When the object was created.

creator class-attribute instance-attribute #

creator: Optional[User] = field(hash=False, repr=False)

The user who created the scheduled event.

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

description class-attribute instance-attribute #

description: Optional[str] = field(hash=False, repr=False)

Description of the scheduled event.

end_time class-attribute instance-attribute #

end_time: Optional[datetime] = field(hash=False, repr=False)

When the event is scheduled to end, if set.

entity_type class-attribute instance-attribute #

entity_type: ScheduledEventType = field(hash=False, repr=True)

The type of entity this scheduled event is associated with.

guild_id class-attribute instance-attribute #

guild_id: Snowflake = field(hash=False, repr=True)

ID of the guild this scheduled event belongs to.

id class-attribute instance-attribute #

id: Snowflake = field(hash=True, repr=True)

ID of the scheduled event.

image_hash class-attribute instance-attribute #

image_hash: Optional[str] = field(hash=False, repr=False)

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

image_url property #

image_url: Optional[URL]

Cover image for this scheduled event, if set.

name class-attribute instance-attribute #

name: str = field(hash=False, repr=True)

Name of the scheduled event.

privacy_level class-attribute instance-attribute #

privacy_level: EventPrivacyLevel = field(hash=False, repr=False)

Privacy level of the scheduled event.

This restricts who can view and join the scheduled event.

start_time class-attribute instance-attribute #

start_time: datetime = field(hash=False, repr=False)

When the event is scheduled to start.

status class-attribute instance-attribute #

status: ScheduledEventStatus = field(hash=False, repr=True)

Status of the scheduled event.

user_count class-attribute instance-attribute #

user_count: Optional[int] = field(hash=False, repr=False)

The number of users that have subscribed to the event.

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

make_image_url #

make_image_url(*, ext: str = 'png', size: int = 4096) -> Optional[URL]

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

PARAMETER DESCRIPTION
ext

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

TYPE: str DEFAULT: 'png'

size

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

TYPE: int DEFAULT: 4096

RETURNS DESCRIPTION
Optional[URL]

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

RAISES DESCRIPTION
ValueError

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

ScheduledEventStatus #

Bases: int, Enum

Enum of the scheduled event statuses.

ACTIVE class-attribute instance-attribute #

ACTIVE = 2

Indicates an event is on-going.

CANCELED class-attribute instance-attribute #

CANCELED = 4

Indicates an event has been canceled.

CANCELLED class-attribute instance-attribute #

CANCELLED = CANCELED

COMPLETED class-attribute instance-attribute #

COMPLETED = 3

Indicates an event has finished.

SCHEDULED class-attribute instance-attribute #

SCHEDULED = 1

Indicates that the scheduled event hasn't occurred yet.

name property #

name: str

Return the name of the enum member as a str.

value property #

value

Return the value of the enum member.

ScheduledEventType #

Bases: int, Enum

Enum of the scheduled event types.

EXTERNAL class-attribute instance-attribute #

EXTERNAL = 3

A scheduled event which takes part outside of Discord.

STAGE_INSTANCE class-attribute instance-attribute #

STAGE_INSTANCE = 1

A scheduled stage instance.

VOICE class-attribute instance-attribute #

VOICE = 2

A scheduled voice chat event.

name property #

name: str

Return the name of the enum member as a str.

value property #

value

Return the value of the enum member.

ScheduledEventUser #

A user who is subscribed to a scheduled event.

event_id class-attribute instance-attribute #

event_id: Snowflake = field(hash=False, repr=True)

ID of the scheduled event they're subscribed to.

member class-attribute instance-attribute #

member: Optional[Member] = field(hash=False, repr=False)

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

user class-attribute instance-attribute #

user: User = field(hash=True, repr=True)

Object representing the user.

ScheduledExternalEvent #

Bases: ScheduledEvent

A scheduled event that takes place outside of Discord.

app class-attribute instance-attribute #

app: RESTAware = field(
    repr=False, eq=False, hash=False, metadata={SKIP_DEEP_COPY: True}
)

Client application that models may use for procedures.

created_at property #

created_at: datetime

When the object was created.

creator class-attribute instance-attribute #

creator: Optional[User] = field(hash=False, repr=False)

The user who created the scheduled event.

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

description class-attribute instance-attribute #

description: Optional[str] = field(hash=False, repr=False)

Description of the scheduled event.

end_time class-attribute instance-attribute #

end_time: datetime = field(hash=False, repr=False)

When the event is scheduled to end.

entity_type class-attribute instance-attribute #

entity_type: ScheduledEventType = field(hash=False, repr=True)

The type of entity this scheduled event is associated with.

guild_id class-attribute instance-attribute #

guild_id: Snowflake = field(hash=False, repr=True)

ID of the guild this scheduled event belongs to.

id class-attribute instance-attribute #

id: Snowflake = field(hash=True, repr=True)

ID of the scheduled event.

image_hash class-attribute instance-attribute #

image_hash: Optional[str] = field(hash=False, repr=False)

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

image_url property #

image_url: Optional[URL]

Cover image for this scheduled event, if set.

location class-attribute instance-attribute #

location: str = field(hash=False, repr=False)

The location of the scheduled event.

Note

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

name class-attribute instance-attribute #

name: str = field(hash=False, repr=True)

Name of the scheduled event.

privacy_level class-attribute instance-attribute #

privacy_level: EventPrivacyLevel = field(hash=False, repr=False)

Privacy level of the scheduled event.

This restricts who can view and join the scheduled event.

start_time class-attribute instance-attribute #

start_time: datetime = field(hash=False, repr=False)

When the event is scheduled to start.

status class-attribute instance-attribute #

status: ScheduledEventStatus = field(hash=False, repr=True)

Status of the scheduled event.

user_count class-attribute instance-attribute #

user_count: Optional[int] = field(hash=False, repr=False)

The number of users that have subscribed to the event.

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

make_image_url #

make_image_url(*, ext: str = 'png', size: int = 4096) -> Optional[URL]

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

PARAMETER DESCRIPTION
ext

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

TYPE: str DEFAULT: 'png'

size

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

TYPE: int DEFAULT: 4096

RETURNS DESCRIPTION
Optional[URL]

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

RAISES DESCRIPTION
ValueError

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

ScheduledStageEvent #

Bases: ScheduledEvent

A scheduled event that takes place in a stage channel.

app class-attribute instance-attribute #

app: RESTAware = field(
    repr=False, eq=False, hash=False, metadata={SKIP_DEEP_COPY: True}
)

Client application that models may use for procedures.

channel_id class-attribute instance-attribute #

channel_id: Snowflake = field(hash=False, repr=False)

ID of the stage channel this event is scheduled in.

created_at property #

created_at: datetime

When the object was created.

creator class-attribute instance-attribute #

creator: Optional[User] = field(hash=False, repr=False)

The user who created the scheduled event.

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

description class-attribute instance-attribute #

description: Optional[str] = field(hash=False, repr=False)

Description of the scheduled event.

end_time class-attribute instance-attribute #

end_time: Optional[datetime] = field(hash=False, repr=False)

When the event is scheduled to end, if set.

entity_type class-attribute instance-attribute #

entity_type: ScheduledEventType = field(hash=False, repr=True)

The type of entity this scheduled event is associated with.

guild_id class-attribute instance-attribute #

guild_id: Snowflake = field(hash=False, repr=True)

ID of the guild this scheduled event belongs to.

id class-attribute instance-attribute #

id: Snowflake = field(hash=True, repr=True)

ID of the scheduled event.

image_hash class-attribute instance-attribute #

image_hash: Optional[str] = field(hash=False, repr=False)

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

image_url property #

image_url: Optional[URL]

Cover image for this scheduled event, if set.

name class-attribute instance-attribute #

name: str = field(hash=False, repr=True)

Name of the scheduled event.

privacy_level class-attribute instance-attribute #

privacy_level: EventPrivacyLevel = field(hash=False, repr=False)

Privacy level of the scheduled event.

This restricts who can view and join the scheduled event.

start_time class-attribute instance-attribute #

start_time: datetime = field(hash=False, repr=False)

When the event is scheduled to start.

status class-attribute instance-attribute #

status: ScheduledEventStatus = field(hash=False, repr=True)

Status of the scheduled event.

user_count class-attribute instance-attribute #

user_count: Optional[int] = field(hash=False, repr=False)

The number of users that have subscribed to the event.

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

make_image_url #

make_image_url(*, ext: str = 'png', size: int = 4096) -> Optional[URL]

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

PARAMETER DESCRIPTION
ext

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

TYPE: str DEFAULT: 'png'

size

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

TYPE: int DEFAULT: 4096

RETURNS DESCRIPTION
Optional[URL]

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

RAISES DESCRIPTION
ValueError

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

ScheduledVoiceEvent #

Bases: ScheduledEvent

A scheduled event that takes place in a voice channel.

app class-attribute instance-attribute #

app: RESTAware = field(
    repr=False, eq=False, hash=False, metadata={SKIP_DEEP_COPY: True}
)

Client application that models may use for procedures.

channel_id class-attribute instance-attribute #

channel_id: Snowflake = field(hash=False, repr=False)

ID of the voice channel this scheduled event is in.

created_at property #

created_at: datetime

When the object was created.

creator class-attribute instance-attribute #

creator: Optional[User] = field(hash=False, repr=False)

The user who created the scheduled event.

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

description class-attribute instance-attribute #

description: Optional[str] = field(hash=False, repr=False)

Description of the scheduled event.

end_time class-attribute instance-attribute #

end_time: Optional[datetime] = field(hash=False, repr=False)

When the event is scheduled to end, if set.

entity_type class-attribute instance-attribute #

entity_type: ScheduledEventType = field(hash=False, repr=True)

The type of entity this scheduled event is associated with.

guild_id class-attribute instance-attribute #

guild_id: Snowflake = field(hash=False, repr=True)

ID of the guild this scheduled event belongs to.

id class-attribute instance-attribute #

id: Snowflake = field(hash=True, repr=True)

ID of the scheduled event.

image_hash class-attribute instance-attribute #

image_hash: Optional[str] = field(hash=False, repr=False)

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

image_url property #

image_url: Optional[URL]

Cover image for this scheduled event, if set.

name class-attribute instance-attribute #

name: str = field(hash=False, repr=True)

Name of the scheduled event.

privacy_level class-attribute instance-attribute #

privacy_level: EventPrivacyLevel = field(hash=False, repr=False)

Privacy level of the scheduled event.

This restricts who can view and join the scheduled event.

start_time class-attribute instance-attribute #

start_time: datetime = field(hash=False, repr=False)

When the event is scheduled to start.

status class-attribute instance-attribute #

status: ScheduledEventStatus = field(hash=False, repr=True)

Status of the scheduled event.

user_count class-attribute instance-attribute #

user_count: Optional[int] = field(hash=False, repr=False)

The number of users that have subscribed to the event.

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

make_image_url #

make_image_url(*, ext: str = 'png', size: int = 4096) -> Optional[URL]

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

PARAMETER DESCRIPTION
ext

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

TYPE: str DEFAULT: 'png'

size

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

TYPE: int DEFAULT: 4096

RETURNS DESCRIPTION
Optional[URL]

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

RAISES DESCRIPTION
ValueError

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