fix: Minor UI fixes.

This commit is contained in:
2023-08-16 12:32:45 +03:00
parent 2cc90375c7
commit 0904b2deb7
5 changed files with 11 additions and 9 deletions

View File

@@ -27,6 +27,7 @@ class MetaCog(LionCog):
) )
) )
async def help_cmd(self, ctx: LionContext): async def help_cmd(self, ctx: LionContext):
await ctx.interaction.response.defer(thinking=True, ephemeral=True)
ui = HelpUI( ui = HelpUI(
ctx.bot, ctx.bot,
ctx.author, ctx.author,

View File

@@ -75,12 +75,14 @@ admin_extra = _p(
and quickly jump to the feature configuration panels to modify settings. and quickly jump to the feature configuration panels to modify settings.
Configuration panels are also accessible directly through the `/configure` commands \ Configuration panels are also accessible directly through the `/configure` commands \
and most settings can be set with these commands. and most features may be configured through these commands.
Other relevant commands for guild configuration below: Other relevant commands for guild configuration below:
`/editshop`: Add/Edit/Remove colour roles from the {coin} shop. `/editshop`: Add/Edit/Remove colour roles from the {coin} shop.
`/ranks`: Add/Edit/Remove activity ranks. `/ranks`: Add/Edit/Remove activity ranks.
`/timer admin`: Add/Edit/Remove Pomodoro timers in voice channels. `/timer admin`: Add/Edit/Remove Pomodoro timers in voice channels.
`/rolemenus`: Allow members to equip roles from customisable messages.
`/economy balance`: Display and modify LionCoin balance for members and roles.
""" """
) )

View File

@@ -261,7 +261,10 @@ class RoomCog(LionCog):
self._start(room) self._start(room)
# Send tips message # Send tips message
await channel.send("{mention} welcome to your private room! (TBD TIPS HERE)".format(mention=owner.mention)) # TODO: Actual tips.
await channel.send(
"{mention} welcome to your private room! You may use the menu below to configure it.".format(mention=owner.mention)
)
# Send config UI # Send config UI
ui = RoomUI(self.bot, room, callerid=owner.id, timeout=None) ui = RoomUI(self.bot, room, callerid=owner.id, timeout=None)

View File

@@ -131,10 +131,7 @@ class ExecUI(View):
return modal return modal
def get_modal(self): def get_modal(self):
if self._modal is None: self._modal = self.create_modal()
# Create modal
self._modal = self.create_modal()
self._modal.code.default = self.code self._modal.code.default = self.code
return self._modal return self._modal
@@ -258,9 +255,8 @@ class Exec(LionCog):
@appcmd.describe( @appcmd.describe(
string="Code to execute." string="Code to execute."
) )
@appcmd.guilds(*guild_ids)
async def async_cmd(self, ctx: LionContext, *, string: Optional[str] = None): async def async_cmd(self, ctx: LionContext, *, string: Optional[str] = None):
await ExecUI(ctx, string, ExecStyle.EXEC).run() await ExecUI(ctx, string, ExecStyle.EXEC, ephemeral=False).run()
@commands.hybrid_command( @commands.hybrid_command(
name=_p('command', 'eval'), name=_p('command', 'eval'),

View File

@@ -479,7 +479,7 @@ class VideoCog(LionCog):
"you disabled your video.\n" "you disabled your video.\n"
"Please keep your video on at all times, and leave the channel if you need " "Please keep your video on at all times, and leave the channel if you need "
"to disable it!" "to disable it!"
)) )).format(channel=channel.mention)
) )
modcog: ModerationCog = self.bot.get_cog('ModerationCog') modcog: ModerationCog = self.bot.get_cog('ModerationCog')
await modcog.send_alert( await modcog.send_alert(