Updated my code, but it's still not working.
const SteamUser = require("steam-user");
const SteamTotp = require("steam-totp");
const SteamCommunity = require('steamcommunity');
let content = "hello world";
const gid ="103582791470169702"
const client = new SteamUser();
const community = new SteamCommunity();
const logOnOptions = {
accountName: "",
password: "",
twoFactorCode: SteamTotp.generateAuthCode("")
}
client.logOn(logOnOptions);
client.on("loggedOn", () => {
console.log("[-] Logged On");
});
client.on("webSession", (sessionid, cookies) => {
manager.setCookies(cookies);
community.setCookies(cookies);
community.startConfirmationChecker(20000, config.identitySecret);
community.postGroupComment(gid, content, (callback) => {
console.log(callback)
});
});