slashtags
slashtags copied to clipboard
Add support for new lines via "\n"
Because of Discord limitations, new line inputs aren't supported for slash commands, and the bot does not have a way of supporting them.
A nice workaround would be where \n in tags is automatically replaced with a new line. This would require a simple function to replace \n with a newline before storing the tag content in the database.
Optionally, if \n is provided, that could be parsed as literally \n, though I doubt anyone puts \n in their tags to explain something.
Example code:
const parsedNewlines = r.replace(/\n/g,' ')
I realize this issue is from last year but I just found this bot and it is exactly what I am looking for... Only that without new line support of some type, I cannot use it. :(
Please add it.
As a workaround, you can create/edit the tag on mobile, where you can use newlines in slash commands.
This suggestion is a hacky workaround and it might interfere with that functionality, but maybe I'll see if it's doable
As a proper fix I want to use modals instead, but unfortunately those cannot provide a great UX currently since they don't support checkboxes (for the ephemeral toggle). Maybe I'll add a separate command for modal editing so it doesn't interfere with the current flow
@advaith1 What if you had your existing command have the ephemeral
, and then bring up a modal where you ask for text input? You could tell the user they will be shown a modal after they run the command in the description.
Hi, found this bot but noticed this hasn't been implemented yet... any updates on this?
As a workaround, you can create/edit the tag on mobile, where you can use newlines in slash commands.
This suggestion is a hacky workaround and it might interfere with that functionality, but maybe I'll see if it's doable
As a proper fix I want to use modals instead, but unfortunately those cannot provide a great UX currently since they don't support checkboxes (for the ephemeral toggle). Maybe I'll add a separate command for modal editing so it doesn't interfere with the current flow
Why use a checkbox? Why not have a dropdown with 2 options: "ephemeral" or "regular message" ?
modals don't support select menus either, only text inputs
@advaith1 What if you had your existing command have the
ephemeral
, and then bring up a modal where you ask for text input? You could tell the user they will be shown a modal after they run the command in the description.
This would work