[fix]: Fix argument

This commit is contained in:
Sweetbread
2023-05-15 23:22:19 +03:00
parent c0f11b96e6
commit d905aca2fe
3 changed files with 31 additions and 29 deletions
+15 -1
View File
@@ -1,5 +1,6 @@
from bot import db
from discord.app_commands import TranslationContextLocation as trans_loc
from discord import app_commands
def region_to_str(region):
# if region == discord.VoiceRegion.russia:
@@ -28,3 +29,16 @@ def translate(string, region):
return pack
else:
return string
async def get_text(inter, location, string):
data = await inter.translate(
app_commands.locale_str(string),
locale=inter.locale,
data=app_commands.TranslationContext(
trans_loc.other,
location
)
)
return data or string