From 5a529fa7445d4132b6fb928e8b12b1544801738c Mon Sep 17 00:00:00 2001 From: Choco <94597336+ChocoMeow@users.noreply.github.com> Date: Fri, 24 Mar 2023 22:27:02 +0800 Subject: [PATCH] Add attr in get_msg function --- voicelink/player.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voicelink/player.py b/voicelink/player.py index 38a1640..8b63ad7 100644 --- a/voicelink/player.py +++ b/voicelink/player.py @@ -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'):