NodeOptions.fromJson constructor

NodeOptions.fromJson(
  1. Map<String, dynamic> json
)

Implementation

NodeOptions.fromJson(Map<String, dynamic> json) {
  host = json["host"] as String;
  port = json["port"] as int;
  ssl = json["ssl"] as bool;
  password = json["password"] as String;
  shards = json["shards"] as int;
  clientId = Snowflake(json["clientId"] as int);
  nodeId = json["nodeId"] as int;
  maxConnectAttempts = json["maxConnectAttempts"] as int;
  delayBetweenReconnections = Duration(milliseconds: json["delayBetweenReconnections"] as int);
  clientName = json["clientName"] as String;
}