Nyxx constructor
Nyxx(
- 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.
Implementation
Nyxx(String token, int intents,
{ClientOptions? options,
CacheOptions? cacheOptions,
bool ignoreExceptions = true,
bool useDefaultLogger = true}) :
super(token, intents, options: options, cacheOptions: cacheOptions,
ignoreExceptions: ignoreExceptions, useDefaultLogger: useDefaultLogger,
) {
this._events = _EventController(this);
this.onSelfMention = this.onMessageReceived
.where((event) => event.message.mentions.map((e) => e.id).contains(self.id));
this.onDmReceived = this.onMessageReceived
.where((event) => event.message is DMMessage);
this._ws = _ConnectionManager(this);
}