discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.96k stars 1.26k forks source link

[mobile] Pasting commands is not selecting the command (similar issue exists) #6523

Open Baaleos opened 1 year ago

Baaleos commented 1 year ago

Description

This issue is similar to https://github.com/discord/discord-api-docs/issues/6306

The distinction between this bug and that bug is that this bug seems to occur whether there are duplicate/similar commands or not. The overall inconvenience is that pasting commands needs to be done twice, and then manual editing needs to be done to achieve the expected outcome of a single paste.

Steps to Reproduce

Eg: Current observed behaviour - A slash command such as /imagine or /event We can copy this to the clipboard easily, but when we paste the command into the chat box - the app does identify the correct command to map it to, but it does not select it. The user has to manually select it, but the act of selecting the command wipes out the arguments, meaning they have to paste twice to get the command pasted. Once to select the command and once again to get the args in - and then they have to delete the slash command from the args.

Expected Behavior

When I paste the command, it should select it immediately and parse the command arguments into the correct argument/fields.

Current Behavior

Pasting the command currently brings up the slash command above the chat box, the user then has to select it. Selecting it wipes out the arguments, but puts the slash command into the chatbox and moves the caret to the first argument/field for entry.

The user then has to paste or re-enter the arguments.

Screenshots/Videos

A video demonstrating the issue is shown here: https://youtube.com/shorts/1QgLpiYpnP4 I am showing it in my custom bot - but I have verified that it occurs on other third party bot slash commands too.

Pending

Client and System Information

This seems to have broke on iOS around 5th or 6th November 2023 - recent app update? App version: 203.0 (updated to this version today, but it was also broke on the previous version) JS Build: 51718 OS: 16.1.1 Device: iPhone15.3 Release Channel: stable

almostDemoPy commented 1 year ago

as far as i understood how it behaved, based from your video, you are pasting a long text of what seems to be a [ contained ] data of the previously executed slash command to the chat box, which just treats it as a string. with it being treated as a string ( despite the arguments you've included in ), the user is still prompted with the slash menu because of the /imagine message starter ( or of what the message or text started with ). selecting the slash command gives you an empty chatbox because iguess the type of the chatbox differs whether you are trying to send a message in the channel or a slash command or something ( because you cannot send both at the same time ). and when you paste those arguments again the 2nd time, it's validated because the " text " is already treated for the slash command, not as a plain text to send in the channel. but i might be wrong here, tbh, just an opinion and my understanding on how it works / process ( this is diff from when you click the slash command mention, except that it just gives you the empty slash command prompt in the chatbox )

Baaleos commented 1 year ago

'Close' The long text is actually multiple arguments

Each one is delimited by fieldname: (fieldname followed by colon) Prior to saturday/Sunday - pasting would have auto-parsed it into the slash command syntax and it would have been a seamless paste - automatically selecting and populating the command args.

I have recorded another video- showing this issue on a 2 argument /slash command - showing that it definitely has nothing to do with the amount of content - it just refuses to allow copy/paste of the command on the iphone app.

This issue happens on my own bot and on midjourney's bot - affecting slash commands on both.

New video here: https://youtu.be/RjNqOCkVI5s

For clarity - before the start of this week - pasting a command, would have pasted it 'as' a command. Now it pastes it as a string, and then prompts if 'is this the command you want.' Choosing the command you want, wipes out the args, you then have to paste the args in again and make some manual changes.

Its a degradation in user experience at the very least. Pasting commands + args is not longer possible in a single paste, you need to paste twice, to achieve the expectant result of pasting once.

almostDemoPy commented 1 year ago

but hen again, as you said, it is pasted as a string. it's unlikely for Discord to just convert the chatbox type to slash command prompt just because they chatbox started with that substring. it is a string because it either gives you the choice to either send it as a text, which is the literal default, or have it as a slash command prompt. the args now work, if you pressed the slash command in the slash menu, because it is not a text chatbox anymore but a slash command prompt. you could type the command in, select it, and paste the args in and idk, maybe that will do

Baaleos commented 1 year ago

The point you are missing is that it 'used' to work. 'it's unlikely for Discord to just convert the chatbox type to slash command ' It is not unlikely, since this was usual behaviour up until the start of this week.

Last week - you could paste the command, and it would auto parse into a slash command. No additional effort required. At most you would need to delete or add a space to your text input and then the string would auto-parse into a command.

Since Sunday/Monday this week - since the new discord app version was released, the functionality has changed. Requiring a user to paste the command twice if they want to replicate a command with arguments. What point is there is copying a command, if not to paste the command.

lsdimagine commented 12 months ago

hmm mobile works differently from web.

clari7744 commented 12 months ago

Just want to put in my 2¢; I've got a Google Sheet that has a formula that parses into a slash command, which then gets copied and pasted into Discord (don't ask) A number of the people that work with this system only use mobile, and as was stated earlier:

At most you would need to delete or add a space to your text input and then the string would auto-parse into a command

(there's only one command with this name in this channel, server even) Now that simply...doesn't work, and they're left with very few options for fixing it. Editing the command name works occasionally but more often than not the arguments get messed up when doing that.