rewrite (config): Add general settings cog.

This commit is contained in:
2023-03-08 11:56:37 +02:00
parent 42b68e8913
commit beafe3f2fe
2 changed files with 2 additions and 2 deletions

View File

@@ -6,8 +6,6 @@ babel = LocalBabel('config')
async def setup(bot):
from .cog import ConfigCog
from .general import GeneralSettingsCog
await bot.add_cog(ConfigCog(bot))
await bot.add_cog(GeneralSettingsCog(bot))

View File

@@ -36,6 +36,7 @@ class GeneralSettings(SettingGroup):
and the timezone used to display guild-wide statistics.
"""
setting_id = 'timezone'
_event = 'guild_setting_update_timezone'
_display_name = _p('guildset:timezone', "timezone")
_desc = _p(
@@ -172,6 +173,7 @@ class GeneralSettingsCog(LionCog):
Partial text is matched directly by case-insensitive substring.
"""
t = self.bot.translator.t
# TODO: To be refactored to Timezone setting
timezones = pytz.all_timezones
matching = [tz for tz in timezones if partial.strip().lower() in tz.lower()][:25]