rewrite: Guild dashboard.

This commit is contained in:
2023-05-14 12:31:11 +03:00
parent c4aa04e71a
commit 16bc05d39b
3 changed files with 180 additions and 9 deletions

View File

@@ -5,11 +5,12 @@ from discord.ext import commands as cmds
from meta import LionBot, LionContext, LionCog
from . import babel
from .dashboard import GuildDashboard
_p = babel._p
class ConfigCog(LionCog):
class DashCog(LionCog):
def __init__(self, bot: LionBot):
self.bot = bot
@@ -19,12 +20,9 @@ class ConfigCog(LionCog):
async def cog_unload(self):
...
@cmds.hybrid_group(
name=_p('group:configure', "configure"),
)
@cmds.hybrid_command(name="dashboard")
@appcmds.guild_only
async def configure_group(self, ctx: LionContext):
"""
Bare command group, has no function.
"""
return
async def dashboard_cmd(self, ctx: LionContext):
ui = GuildDashboard(self.bot, ctx.guild, ctx.author.id, ctx.channel.id)
await ui.run(ctx.interaction)
await ui.wait()