mirror of
https://github.com/UiO-Gaming/ShiteMusicBot.git
synced 2026-11-05 22:04:32 +01:00
17 lines
492 B
Python
17 lines
492 B
Python
from typing import Optional
|
|
|
|
from discord.ext import commands
|
|
|
|
from .localizer.localizerwrapper import LocalizerWrapper
|
|
|
|
|
|
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
|
|
|
|
self.localizer: Optional[LocalizerWrapper] = None
|