Skip to content

Commit

Permalink
allow dev to always get bounty updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Geczy committed Aug 25, 2023
1 parent 51bcf2c commit a9983fd
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { t } from 'i18next'

import { DotaEvent, DotaEventTypes } from '../../../types.js'
import { GSIHandler, redisClient, say } from '../../GSIHandler.js'
import { isDev } from '../../lib/consts.js'
import { getAccountsFromMatch } from '../../lib/getAccountsFromMatch.js'
import { getHeroNameById } from '../../lib/heroes.js'
import { isPlayingMatch } from '../../lib/isPlayingMatch.js'
Expand All @@ -24,7 +25,11 @@ eventHandler.registerEvent(`event:${DotaEventTypes.BountyPickup}`, {
dotaClient.client.gsi?.player?.team_name

// Only for first bounties
if (event.team !== playingTeam || Number(dotaClient.client.gsi?.map?.clock_time) > 120) return
if (
event.team !== playingTeam ||
(!isDev && Number(dotaClient.client.gsi?.map?.clock_time) > 120)
)
return

const { matchPlayers } = await getAccountsFromMatch(dotaClient.client.gsi)

Expand Down

0 comments on commit a9983fd

Please sign in to comment.