From 98955441d134ae8a436938e5b890228c884a189c Mon Sep 17 00:00:00 2001 From: Alex Ott <66271487+AlexanderHOtt@users.noreply.github.com> Date: Fri, 30 Dec 2022 03:21:21 -0800 Subject: [PATCH] explain text_label logic --- discord-bot/bot/extensions/text_labels.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discord-bot/bot/extensions/text_labels.py b/discord-bot/bot/extensions/text_labels.py index 212aa04b..325929d2 100644 --- a/discord-bot/bot/extensions/text_labels.py +++ b/discord-bot/bot/extensions/text_labels.py @@ -55,7 +55,6 @@ class LabelModal(miru.Modal): conn: Connection = context.bot.d.db # type: ignore guild_settings = await GuildSettings.from_db(conn, context.guild_id) - if guild_settings is None or guild_settings.log_channel_id is None: return @@ -148,6 +147,8 @@ class LabelSelect(miru.View): @lightbulb.implements(lightbulb.MessageCommand) async def label_message_text(ctx: lightbulb.MessageContext): """Label a message.""" + # We have to do some funny interaction chaining because discord only allows one component (select or modal) per interaction + # so the select menu will open the modal msg: hikari.Message = ctx.options.target # Exit if the message is empty if not msg.content: