hikari.scheduled_events#
Application and entities that are used to describe guild scheduled events on Discord.
EventPrivacyLevel #
ScheduledEvent #
Bases: Unique
Base class for scheduled events.
app class-attribute instance-attribute #
app: RESTAware = attrs.field(
repr=False,
eq=False,
hash=False,
metadata={attrs_extensions.SKIP_DEEP_COPY: True},
)
Client application that models may use for procedures.
creator class-attribute instance-attribute #
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 of the scheduled event.
end_time class-attribute instance-attribute #
When the event is scheduled to end, if set.
entity_type class-attribute instance-attribute #
entity_type: ScheduledEventType = attrs.field(
hash=False, repr=True
)
The type of entity this scheduled event is associated with.
guild_id class-attribute instance-attribute #
ID of the guild this scheduled event belongs to.
id class-attribute instance-attribute #
ID of the scheduled event.
image_hash class-attribute instance-attribute #
Hash of the image used for the scheduled event, if set.
name class-attribute instance-attribute #
Name of the scheduled event.
privacy_level class-attribute instance-attribute #
privacy_level: EventPrivacyLevel = attrs.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 #
When the event is scheduled to start.
status class-attribute instance-attribute #
status: ScheduledEventStatus = attrs.field(
hash=False, repr=True
)
Status of the scheduled event.
user_count class-attribute instance-attribute #
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(
*,
file_format: Literal[
"PNG", "JPEG", "JPG", "WEBP"
] = "PNG",
size: int = 4096,
lossless: bool = True,
) -> URL | None
Generate the cover image URL for this scheduled event, if set.
If no cover image is set, this returns None.
| PARAMETER | DESCRIPTION |
|---|---|
file_format | The format to use for this URL. Supports If not specified, the format will be TYPE: |
size | The size to set for the URL; Can be any power of two between TYPE: |
lossless | Whether to return a lossless or compressed WEBP image; This is ignored if TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
Optional[URL] | The URL, or |
| RAISES | DESCRIPTION |
|---|---|
TypeError | If an invalid format is passed for |
ValueError | If |
ScheduledEventStatus #
ScheduledEventUser #
ScheduledExternalEvent #
Bases: ScheduledEvent
A scheduled event that takes place outside of Discord.
end_time class-attribute instance-attribute #
When the event is scheduled to end.
ScheduledStageEvent #
Bases: ScheduledEvent
A scheduled event that takes place in a stage channel.