Skip to content

Commit

Permalink
Fix v1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfies committed Mar 2, 2022
1 parent 8a30729 commit 169354c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ async def _get_build_number(session): # Thank you Discord-S.C.U.M
build_url = 'https://discord.com/assets/' + re.compile(r'assets/+([a-z0-9]+)\.js').findall(login_page)[-2] + '.js'
build_request = await session.request('get', build_url, headers={'Accept-Encoding': 'gzip, deflate'}, timeout=10)
build_file = await build_request.text()
build_index = build_file.find('buildNumber') + 14
build_index = build_file.find('buildNumber') + 24
return int(build_file[build_index:build_index + 5])
except:
log.warning('Could not fetch client build number.')
Expand Down

0 comments on commit 169354c

Please sign in to comment.