MCPcopy
hub / github.com/slackapi/node-slack-sdk / RTMClient

Class RTMClient

packages/rtm-api/src/RTMClient.ts:37–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 * messages.
36 */
37export class RTMClient extends EventEmitter {
38 /**
39 * Whether or not the client is currently connected to the RTM API
40 */
41 public connected: boolean = false;
42
43 /**
44 * Whether or not the client has authenticated to the RTM API. This occurs when the connect method
45 * completes, and a WebSocket URL is available for the client's connection.
46 */
47 public authenticated: boolean = false;
48
49 /**
50 * The user ID for the connected client.
51 */
52 public activeUserId?: string;
53
54 /**
55 * The team ID for the workspace the client is connected to.
56 */
57 public activeTeamId?: string;
58
59 /**
60 * Internal use web client
61 */
62 private webClient: WebClient;
63
64 /**
65 * An agent used to manage TCP connections for requests. Most commonly used to implement proxy support. See
66 * npm packages `tunnel` and `https-proxy-agent` for information on how to construct a proxy agent.
67 */
68 private agentConfig?: Agent;
69
70 /**
71 * Whether this client will automatically reconnect when (not manually) disconnected
72 */
73 private autoReconnect: boolean;
74
75 /**
76 * Use the `rtm.connect` method to connect when true, or the `rtm.start` method when false
77 */
78 private useRtmConnect: boolean;
79
80 /**
81 * The number of milliseconds to wait upon connection for reply messages from the previous connection. The default
82 * value is 2 seconds.
83 */
84 private replyAckOnReconnectTimeout: number;
85
86 /**
87 * State machine that backs the transition and action behavior
88 */
89 private stateMachine: StateMachine<string, string>;
90
91 /**
92 * Configuration for the state machine
93 */
94 private stateMachineConfig = Finity

Callers

nothing calls this directly

Calls 7

setupWebsocketMethod · 0.95
teardownWebsocketMethod · 0.95
apiCallMethod · 0.80
debugMethod · 0.65
infoMethod · 0.65
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected