NyxxPluginState<ClientType extends Nyxx, PluginType extends NyxxPlugin<ClientType>> class

Holds the state of a plugin added to a client.

Constructors

NyxxPluginState(PluginType plugin)
Create a new plugin state.

Properties

hashCode int
The hash code for this object.
no setterinherited
logger Logger
A logger that can be used to log messages from this plugin.
no setter
plugin → PluginType
The plugin this state belongs to.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

afterClose() FutureOr<void>
Called after each client this plugin is added to closes.
afterConnect(ClientType client) FutureOr<void>
Called after each client this plugin is added to connects.
beforeClose(ClientType client) FutureOr<void>
Called before each client this plugin is added to closes.
beforeConnect(ApiOptions apiOptions, ClientOptions clientOptions) FutureOr<void>
Called before each client this plugin is added to connects.
interceptGatewayMessages(Shard shard, Stream<GatewayMessage> messages) Stream<GatewayMessage>
Intercept GatewayMessages by transforming the messages stream.
interceptRequest(ClientType client, HttpRequest request, Future<HttpResponse> next(HttpRequest)) Future<HttpResponse>
Called whenever a request is made using a client's HttpHandler.
interceptShardMessages(Shard shard, Stream<ShardMessage> messages) Stream<ShardMessage>
Intercept ShardMessages by transforming the messages stream.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited