NyxxRest class
Lightweight client which do not start ws connections.
Constructors
- NyxxRest(String _token, int intents, {ClientOptions? options, CacheOptions? cacheOptions, bool ignoreExceptions = true, bool useDefaultLogger = true})
-
Creates and logs in a new client. If
ignoreExceptions
is true (by default is) isolate will ignore all exceptions and continue to work.
Properties
- app ↔ ClientOAuth2Application
-
The bot"s OAuth2 app.
getter/setter pair
- channels ↔ ChannelCache
-
All of the channels the bot can see.
latefinaloverride-getter
-
guilds
↔ Cache<
Snowflake, Guild> -
All of the guilds the bot is in. Can be empty or can miss guilds on (READY_EVENT).
latefinaloverride-getter
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpEndpoints → IHttpEndpoints
-
Returns handler for all available REST API action.
no setterinherited
- intents → int
-
When identifying to the gateway, you have to specify an intents parameter which
allows you to conditionally subscribe to pre-defined "intents", groups of events defined by Discord.
If you do not specify a certain intent, you will not receive any of the gateway events that are batched into that group.
Since api v8 its required upon connecting to gateway.
final
- inviteLink → String
-
Gets an bot invite link with zero permissions
no setter
-
onHttpError
↔ Stream<
HttpErrorEvent> -
Emitted when a HTTP request failed.
getter/setter pairinherited
-
onHttpResponse
↔ Stream<
HttpResponseEvent> -
Emitted when a successful HTTP response is received.
getter/setter pairinherited
-
onRateLimited
↔ Stream<
RatelimitEvent> -
Sent when the client is rate limited, either by the rate limit handler itself,
or when a 429 is received.
getter/setter pairinherited
- options → ClientOptions
-
Can be used to edit options after client initialised. Used by Nyxx.interactions to enable raw events
no setter
- ready ↔ bool
-
True if client is ready.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- self ↔ ClientUser
-
The current bot user.
getter/setter pair
-
users
↔ Cache<
Snowflake, User> -
All of the users the bot can see. Does not have offline users
without
forceFetchUsers
enabled.latefinaloverride-getter - version → String
-
The current version of
nyxx
final
Methods
-
dispose(
) → Future< void> -
Perform cleanup
override
-
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