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.
recurrence_rule class-attribute instance-attribute #
recurrence_rule: ScheduledEventRecurrenceRule | None = (
attrs.field(hash=False, repr=False)
)
The definition for how often this event should recur, if set.
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 |
ScheduledEventRecurrenceNWeekday #
A specific day within a specific week for a scheduled event to recur on.
ScheduledEventRecurrenceRule #
The definition for how often a scheduled event should recur.
This is a subset of the behaviours defined in the iCalendar RFC and is subject to several limitations on which field combinations are valid, which are documented here.
by_month class-attribute instance-attribute #
by_month: (
Sequence[ScheduledEventRecurrenceMonth | int] | None
) = attrs.field(default=None, repr=False)
The specific months to recur on, if set.
by_month_day class-attribute instance-attribute #
The specific dates within a month to recur on (1-31), if set.
by_n_weekday class-attribute instance-attribute #
by_n_weekday: (
Sequence[ScheduledEventRecurrenceNWeekday] | None
) = attrs.field(default=None, repr=False)
The specific days within specific weeks for the event to recur on, if set.
by_weekday class-attribute instance-attribute #
by_weekday: (
Sequence[ScheduledEventRecurrenceWeekday | int] | None
) = attrs.field(default=None, repr=False)
The specific days within a week for the event to recur on, if set.
by_year_day class-attribute instance-attribute #
The specific days within a year to recur on (1-364), if set.
Note
This cannot be set when creating or editing a scheduled event and will be ignored there.
count class-attribute instance-attribute #
The total amount of times the event is allowed to recur before stopping, if set.
Note
This cannot be set when creating or editing a scheduled event and will be ignored there.
end class-attribute instance-attribute #
The ending time of the recurrence interval, if set.
Note
This cannot be set when creating or editing a scheduled event and will be ignored there.
frequency class-attribute instance-attribute #
frequency: ScheduledEventRecurrenceFrequency | int = (
attrs.field(repr=True)
)
How often the event occurs.
interval class-attribute instance-attribute #
The spacing between events, defined by frequency.
For example, a frequency of hikari.scheduled_events.ScheduledEventRecurrenceFrequency.WEEKLY and an interval of 2 would be "every-other week".
ScheduledEventRecurrenceWeekday #
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.