Files
ShiteMusicBot/musicbot/utils/localisation/localizedcontext.py
T
2022-05-29 13:43:14 +02:00

12 lines
365 B
Python

# Discord Packages
from discord.ext import commands
class LocalizedContext(commands.Context):
def __init__(self, **kwargs):
super().__init__(**kwargs)
if self.message.guild:
self.locale = self.bot.settings.get(self.message.guild, 'locale', 'default_locale')
else:
self.locale = self.bot.settings.default_locale