How to use the @slack/client.LogLevel.DEBUG function in @slack/client

To help you get started, we’ve selected a few @slack/client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github desktopui / silver-bullet / electron / src / api.ts View on Github external
useEffect(() => {
    const params = {
      logLevel: LogLevel.DEBUG,
      autoReconnect: true,
      useRtmConnect: false
    };
    const rtm = new RTMClient(token, params);
    rtm.start().then(res => console.log("rtm started", res));
    rtm.on("message", message => {
      // Log the message
      console.log(
        `(channel:${message.channel}) ${message.user} says: ${message.text}`
      );
    });
  }, []);
}