Skip to content

Commit

Permalink
Add country property to player
Browse files Browse the repository at this point in the history
  • Loading branch information
Lekuruu committed Mar 23, 2024
1 parent 22102cb commit 6a227f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions osu/objects/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from ..bancho.streams import StreamOut
from ..bancho.constants import (
ClientPackets,
CountryCodes,
LevelGraph,
Privileges,
Mode
Expand Down Expand Up @@ -80,6 +81,10 @@ def level(self) -> int:

return 1

@property
def country(self) -> str:
return list(CountryCodes.keys())[self.country_code]

def request_presence(self):
"""Request a presence update for this player"""
self.game.bancho.request_presence([self.id])
Expand Down

0 comments on commit 6a227f7

Please sign in to comment.