Skip to content

Commit

Permalink
steam has multiple accounts now
Browse files Browse the repository at this point in the history
  • Loading branch information
Geczy committed Oct 2, 2023
1 parent 0046d1c commit e6b0a1d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/steam/src/steam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,15 @@ class Dota {
}

getUserDetails() {
if (!process.env.STEAM_USER || !process.env.STEAM_PASS) {
const usernames = process.env.STEAM_USER?.split('|') ?? []
const passwords = process.env.STEAM_PASS?.split('|') ?? []
if (!usernames.length || !passwords.length) {
throw new Error('STEAM_USER or STEAM_PASS not set')
}

return {
account_name: process.env.STEAM_USER,
password: process.env.STEAM_PASS,
account_name: usernames[0],
password: passwords[0],
}
}

Expand Down

0 comments on commit e6b0a1d

Please sign in to comment.