mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Fix bugs
This commit is contained in:
parent
7b4a3b8fb3
commit
798be9e936
1 changed files with 5 additions and 7 deletions
|
@ -36,7 +36,7 @@ class DotaCommand(Command):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _display(dota: Dota) -> str:
|
def _display(dota: Dota) -> str:
|
||||||
string = f"ℹ️ [b]{dota.steam}[/b]\n"
|
string = f"ℹ️ [b]{dota.steam.persona_name}[/b]\n"
|
||||||
|
|
||||||
if dota.rank:
|
if dota.rank:
|
||||||
string += f"{dota.rank}\n"
|
string += f"{dota.rank}\n"
|
||||||
|
@ -139,14 +139,12 @@ class DotaCommand(Command):
|
||||||
|
|
||||||
message = ""
|
message = ""
|
||||||
for steam in author.steam:
|
for steam in author.steam:
|
||||||
dota = steam.dota
|
await self._update(steam, data.session)
|
||||||
if dota is None:
|
if steam.dota is None:
|
||||||
continue
|
continue
|
||||||
found_something = True
|
found_something = True
|
||||||
await self._update(steam)
|
message += self._display(steam.dota)
|
||||||
message += self._display(steam)
|
|
||||||
message += "\n"
|
message += "\n"
|
||||||
if not found_something:
|
if not found_something:
|
||||||
if len(author.leagueoflegends) == 0:
|
raise UserError("Nessun account di Dota 2 trovato.")
|
||||||
raise UserError("Nessun account di Dota 2 trovato.")
|
|
||||||
await data.reply(message)
|
await data.reply(message)
|
||||||
|
|
Loading…
Reference in a new issue