dota2wins: allow finding steam ID by username
This commit is contained in:
parent
e85425c8c6
commit
f81d903480
@ -42,6 +42,11 @@ class Dota2wins(IntervalModule):
|
||||
|
||||
def run(self):
|
||||
api.set_api_key(self.steam_api_key)
|
||||
|
||||
if not isinstance(self.steamid, int):
|
||||
# find by username
|
||||
self.steamid = int(api.get_steam_id(self.steamid)['response']['steamid'])
|
||||
|
||||
hist = api.get_match_history(account_id=self.steamid)['result']
|
||||
recent_matches = []
|
||||
while len(recent_matches) < self.matches:
|
||||
|
Loading…
Reference in New Issue
Block a user