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:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user