Refactor language retrieval functions

Removed get_lang_non_async and replaced its usage with a new internal _get_lang function. Updated get_lang to use _get_lang for consistency. Updated Player class to use _get_lang directly, improving code clarity and reducing duplication.
This commit is contained in:
Choco
2025-09-23 10:47:44 +08:00
parent 0a7e9558b8
commit 355d0e1186
2 changed files with 15 additions and 17 deletions

View File

@@ -258,7 +258,7 @@ class Player(VoiceProtocol):
"""Retrieves a localized message or list of messages based on the given keys
for the guild associated with this player.
"""
return func.get_lang_non_async(self.guild.id, *keys)
return func._get_lang(self.settings.get("lang"), *keys)
def required(self, leave=False):
"""