Add attr in get_msg function

This commit is contained in:
Choco
2023-03-24 22:27:02 +08:00
parent 927cfc4cd8
commit 5a529fa744

View File

@@ -196,8 +196,8 @@ class Player(VoiceProtocol):
def ping(self) -> float:
return round(self._ping / 1000, 2)
def get_msg(self, mKey: str) -> str:
return func.langs.get(self.lang, func.langs["EN"])[mKey]
def get_msg(self, mKey: str, lang: str = None) -> str:
return func.langs.get(lang if lang else self.lang, func.langs["EN"])[mKey]
def required(self, leave=False):
if self.settings.get('votedisable'):