Skip to content

Commit

Permalink
🔀 Merge pull request #1266 from TF2Autobot/fix-steamuser-enums
Browse files Browse the repository at this point in the history
Fix steam-user enums
  • Loading branch information
idinium96 authored Jul 30, 2022
2 parents 16d321b + 42e0b35 commit ff0eaf2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/classes/Bot.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import SteamID from 'steamid';
import SteamUser, { EResult } from 'steam-user'; // { EResult, EPersonaState } gives me crash
import { EPersonaState } from 'steam-user';
import SteamUser from 'steam-user';
import { EResult, EPersonaState } from 'steam-user';
import TradeOfferManager, { CustomError } from '@tf2autobot/tradeoffer-manager';
import SteamCommunity from '@tf2autobot/steamcommunity';
import SteamTotp from 'steam-totp';
Expand Down Expand Up @@ -832,7 +832,7 @@ export default class Bot {
await this.login(data.loginKey || null)
.then(successResponse)
.catch(async (err: CustomError) => {
if (!lastLoginFailed && err.eresult === 5) {
if (!lastLoginFailed && err.eresult === EResult.InvalidPassword) {
this.handler.onLoginError(err);
lastLoginFailed = true;
// Try and sign in without login key
Expand Down

0 comments on commit ff0eaf2

Please sign in to comment.