discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Slash command user mentioning has strange behavior when Discord is expecting a String instead (Android Only)

Open ZorudaRinku opened this issue 2 years ago • 0 comments

Description

I will admit, this is a slight misuse of slash command argument expectations. The use I've made for a discord bot uses both Discord mentions as well as Reddit usernames. If we tell discord to expect a discord mention, it's impossible to mention a reddit username without providing a different argument.

Instead, we can tell Discord to expect a String and allow users to ping someone, or provide a reddit username as a string.

When using this configuration, the command becomes malformed once a user is pinged when it was instead expecting a string

Issue only shows on discord Android (Unsure about iOS). Windows handles issue with expected behavior

Steps to Reproduce

Create a slash command with more than one arguments. With the second or following argument being a string, ping a user while entering the "String" argument

Expected Behavior

Pinging a user even with String expectation shouldn't malform the command

Current Behavior

The ping becomes appended to the end of the first argument instead of the value of the argument currently being edited

Screenshots/Videos

https://cdn.discordapp.com/attachments/927048869022425118/1000614382474104873/SM-G965U_20220723220328.mp4

Client and System Information

My testing was done using the pycord (py-cord) library (2.0.0) both on Android Discord (126.21 - Stable), Android 10

ZorudaRinku avatar Jul 24 '22 04:07 ZorudaRinku

do you have access to our react native android app? I feel it should work there

lsdimagine avatar Aug 29 '22 18:08 lsdimagine

The Android app has been rewritten (see https://discord.com/blog/android-react-native-framework-update). Because this is an Android-only issue that predates code sharing with iOS and web, it is likely not reproducible. Please reopen this issue if you still see a problem.

typpo avatar Sep 09 '22 19:09 typpo