Merge branch 'rewrite' into pillow
This commit is contained in:
@@ -139,7 +139,7 @@ class TasklistCog(LionCog):
|
||||
self.bot.add_view(TasklistCaller(self.bot))
|
||||
|
||||
configcog = self.bot.get_cog('ConfigCog')
|
||||
self.crossload_group(self.configure_group, configcog.configure_group)
|
||||
self.crossload_group(self.configure_group, configcog.config_group)
|
||||
|
||||
@LionCog.listener('on_tasks_completed')
|
||||
@log_wrap(action="reward tasks completed")
|
||||
@@ -261,6 +261,7 @@ class TasklistCog(LionCog):
|
||||
"Open your tasklist."
|
||||
)
|
||||
)
|
||||
@appcmds.guild_only
|
||||
async def tasklist_cmd(self, ctx: LionContext):
|
||||
if not ctx.interaction:
|
||||
return
|
||||
@@ -270,6 +271,7 @@ class TasklistCog(LionCog):
|
||||
name=_p('group:tasks', "tasks"),
|
||||
description=_p('group:tasks|desc', "Base command group for tasklist commands.")
|
||||
)
|
||||
@appcmds.guild_only
|
||||
async def tasklist_group(self, ctx: LionContext):
|
||||
raise NotImplementedError
|
||||
|
||||
@@ -984,7 +986,6 @@ class TasklistCog(LionCog):
|
||||
reward=TasklistSettings.task_reward._desc,
|
||||
reward_limit=TasklistSettings.task_reward_limit._desc
|
||||
)
|
||||
@appcmds.default_permissions(manage_guild=True)
|
||||
@low_management_ward
|
||||
async def configure_tasklist_cmd(self, ctx: LionContext,
|
||||
reward: Optional[int] = None,
|
||||
|
||||
@@ -13,6 +13,7 @@ from utils.lib import tabulate
|
||||
from utils.ui import LeoUI, FastModal, error_handler_for, ModalRetryUI, DashboardSection
|
||||
from core.data import CoreData
|
||||
from babel.translator import ctx_translator
|
||||
from wards import low_management_iward, high_management_iward
|
||||
|
||||
from . import babel
|
||||
from .data import TasklistData
|
||||
@@ -28,7 +29,8 @@ class TasklistSettings(SettingGroup):
|
||||
Exposed via `/configure tasklist`, and the standard configuration interface.
|
||||
"""
|
||||
setting_id = 'task_reward'
|
||||
_set_cmd = 'configure tasklist'
|
||||
_set_cmd = 'config tasklist'
|
||||
_write_ward = low_management_iward
|
||||
|
||||
_display_name = _p('guildset:task_reward', "task_reward")
|
||||
_desc = _p(
|
||||
@@ -68,7 +70,8 @@ class TasklistSettings(SettingGroup):
|
||||
|
||||
class task_reward_limit(ModelData, IntegerSetting):
|
||||
setting_id = 'task_reward_limit'
|
||||
_set_cmd = 'configure tasklist'
|
||||
_set_cmd = 'config tasklist'
|
||||
_write_ward = low_management_iward
|
||||
|
||||
_display_name = _p('guildset:task_reward_limit', "task_reward_limit")
|
||||
_desc = _p(
|
||||
@@ -109,6 +112,7 @@ class TasklistSettings(SettingGroup):
|
||||
|
||||
class tasklist_channels(ListData, ChannelListSetting):
|
||||
setting_id = 'tasklist_channels'
|
||||
_write_ward = low_management_iward
|
||||
|
||||
_display_name = _p('guildset:tasklist_channels', "tasklist_channels")
|
||||
_desc = _p(
|
||||
@@ -317,7 +321,7 @@ class TasklistConfigUI(LeoUI):
|
||||
|
||||
|
||||
class TasklistDashboard(DashboardSection):
|
||||
section_name = _p('dash:tasklist|name', "Tasklist Configuration ({commands[configure tasklist]})")
|
||||
section_name = _p('dash:tasklist|name', "Tasklist Configuration ({commands[config tasklist]})")
|
||||
_option_name = _p(
|
||||
"dash:tasklist|dropdown|placeholder",
|
||||
"Tasklist Options Panel"
|
||||
|
||||
Reference in New Issue
Block a user