TJ-Bot
TJ-Bot copied to clipboard
Convert /tag-manage create-with-message & edit-with-message into message-context commands
Overview
The two slash commands:
/tag-manage create-with-message/tag-manage edit-with-message
would benefit extremely from being transformed into message-context commands instead.
Their old slash-command counterpart can be deleted alltogether.
Duplication
It is up to the implementor to decide how to tackle code duplication best when extracting the commands into new classes. Its possible that some of the existing logic in TagManageCommand has to be moved around for better reusage.
y not use modals instead?
no idea about modals. how would that look like?
@Tais993 what do u think?
https://discord.com/developers/docs/interactions/message-components#text-inputs
first run the command then a modal will pop up write the tag id and content in it and submit and u r done
does it show code formatted / preview-wise? how would it be JDA-wise? do we need to create support for that first? in particular for the routing?
do we need to create support for that first?
yes
does it show code formatted / preview-wise?
i dont think so, wait 5 mins i can check real quick
yes it does not

yes it does not
it does not? where is the final preview. its all raw and unformatted.
Modal does not work with any kind of markdown, so no not an option.
Regarding modal support, once JDA is updated I'll create a small PR which adds support (and i tested or it works)
what about we make create-with-message a message context command and keep edit-with-message as slash command
but make edit with message use modals so my idea is instead of edit-with-message we make it edit and it'll take a option id of the tag we want to edit, after that we give a modal which have the previous raw text already and we can just edit that and save
just realized we have edit and edit-with-message so we can have a single command edit and it'll have another option clear so if its true the modal will be empty and the user can paste new text
closing this as we dont want to make them context commands due to the limit