Nyxx constructor

Nyxx(
  1. String token,
  2. int intents, {
  3. ClientOptions? options,
  4. CacheOptions? cacheOptions,
  5. bool ignoreExceptions = true,
  6. 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);
}