Add auto prefix to name
This commit is contained in:
parent
9f20ebd44b
commit
7dec09250b
1 changed files with 6 additions and 3 deletions
|
@ -109,7 +109,7 @@ class Lobby:
|
|||
return r
|
||||
|
||||
|
||||
def join_lobby(self):
|
||||
def join(self):
|
||||
own_player_data = self._post(f"/join", {
|
||||
"name": self.bot_name,
|
||||
"token": self.token,
|
||||
|
@ -165,10 +165,10 @@ def main():
|
|||
|
||||
lobby = Lobby.from_lobby_url(
|
||||
lobby_url,
|
||||
bot_name,
|
||||
"🚗 " + bot_name,
|
||||
bot_token
|
||||
)
|
||||
lobby.join_lobby()
|
||||
lobby.join()
|
||||
|
||||
def can_answer(proposal):
|
||||
return proposal["status"] == "pending" and any(
|
||||
|
@ -236,6 +236,9 @@ def main():
|
|||
lobby.create_proposal(map_name, 500, [lobby.own_player_id, p2])
|
||||
except (KeyboardInterrupt, EOFError):
|
||||
print(" Quitting")
|
||||
finally:
|
||||
# Remove auto prefix from name
|
||||
Lobby.from_lobby_url(lobby_url, bot_name, bot_token).join()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in a new issue