Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

"Friends befriend" and spaces in usernames #220

Closed
2 of 6 tasks
Russia9 opened this issue Nov 25, 2019 · 3 comments
Closed
2 of 6 tasks

"Friends befriend" and spaces in usernames #220

Russia9 opened this issue Nov 25, 2019 · 3 comments

Comments

@Russia9
Copy link

Russia9 commented Nov 25, 2019

How have you installed cordless

  • Arch User Repository
  • Snap
  • scoop
  • brew
  • go get
  • git build

What happened

Discord usernames may contain spaces. Using the friends befriend command with these usernames causes a problem - they are not fully processed.

How do you reproduce this bug

  1. Find a user with username like Te st#1234
  2. Open cordless command window
  3. Run command friends befriend Te st#1234

Error output

$ friends befriend Te st#1234
Usage: friends befriend <Username|Username#NNNN|UserID

How to fix

I think it is necessary to concatenation of all arguments, for example like this:

var userId = strings.Join(parameters[:], " ")

System information

Key Value
OS Arch Linux
Architechture x86_64
@Bios-Marcel
Copy link
Owner

Bios-Marcel commented Nov 25, 2019

you have to use quoting: cmd "Te st"

@Russia9
Copy link
Author

Russia9 commented Nov 25, 2019

Thanks, this solves the problem. But it’s worth adding these quotes to Usage:

Usage: friends befriend "<Username|Username#NNNN|UserID>"

@Russia9 Russia9 closed this as completed Nov 25, 2019
@Bios-Marcel
Copy link
Owner

yeah, maybe

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants