How to use the steam-user.EConnectionProtocol function in steam-user

To help you get started, we’ve selected a few steam-user 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 MitchDizzle / ChatLogger.JS / src / chatlogger.js View on Github external
const SteamUser = require('steam-user');
const readline = require('readline');
const path = require('path');
const SteamID = require('steamid');
var endOfLine = require('os').EOL;

var keytar = null;
try {
    keytar = require('keytar');
} catch (e) {
    //Not using keytar.
}

var client = new SteamUser({
    "machineIdType":"PersistentRandom",
    "protocol": SteamUser.EConnectionProtocol.WebSocket,
});
var steamUserName;
var appPath = ".";
//Default config.
var config = {
  "logDirectory":"./logs",
  "fileFormat":"{SteamID64} - {Nickname}.txt",
  "messageFormat":"[{Time}] {BothNames}: {Message}",
  "invalidCharReplacement":"_",
  "seperationString":"──────────{Date}──────────",
  "bothNameFormat":"{Name} ({Nickname})",
  "dateFormat":"L",
  "timeFormat":"LT",
  "saveLoginData":false
};