rewrite: Guild dashboard.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user