API reference¶
A component handler for hikari, built on Discord's Components V2.
A view is a class whose fields are its state, whose render returns its layout, and
whose handlers answer the clicks on it. The state travels inside the message by
default, so views survive restarts with no infrastructure. A view that outgrows the
message can keep its state in a store.
Subpackages¶
-
Where a view's state lives, and which of its fields are state.
-
Where a view keeps its durable state:
InMessageorInStore. -
A view's durable fields, and how their values are packed into state.
-
Stores for
InStorestate: theStoreprotocol and the stores risa ships. -
MemoryStore, the store that keeps state in this process. -
PostgresStore, a store on PostgreSQL. Install it with the[postgres]extra. -
The contract a state store implements.
-
RedisStore, a store on Redis. Install it with the[redis]extra. -
verify_store, the conformance check forStoreimplementations. -
The components a view's layout is built from, and
Rendered, a built view. -
Building a view's layout into the components of a message.
-
The components a view's layout is built from, Discord's Components V2.
Modules¶
-
Putting handlers on components, with or without wire arguments.
-
The client that routes clicks to views, and the functions that make one.
-
How
InMessagestate is written intocustom_idcharacters. -
The contexts handlers and hooks answer interactions through.
-
Dependency injection for handlers, through linkd.
-
The exceptions risa raises.
-
Views, their handlers, and how they are registered.
The names of risa.binding, risa.client, risa.context, risa.di, risa.errors, risa.state, risa.store and risa.view are also importable directly from risa.