Skip to content

Conversation

@FDUTCH
Copy link
Contributor

@FDUTCH FDUTCH commented Jun 26, 2025

with this change you can put as much spaces as you want into the command
something like this: /tell "Cool guy" hello! will not result an error any more

@FDUTCH
Copy link
Contributor Author

FDUTCH commented Sep 15, 2025

✂️

@FDUTCH
Copy link
Contributor Author

FDUTCH commented Sep 16, 2025

I think I've achieved everything I need from this PR 🔥

// string ...
func (p parser) string(line *Line, v reflect.Value) error {
if p.fields == 1 {
return p.restAsString(line, v)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this what the Varargs parameter type is for?

Comment on lines +50 to +55
val := v[0]
if val == "" {
line.RemoveNext()
return line.Next()
}
return val, true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignoring the empty arg should probably be done in NextN for more consistent behavior? It's a bit odd that one would skip over empty args and the other wouldn't

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would go a step further and do the same for RemoveN

args := strings.Split(commandLine, " ")

var (
name string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to leave a comment here explaining this is to allow something like / command to work

@DaPigGuy DaPigGuy self-assigned this Dec 16, 2025
@DaPigGuy DaPigGuy removed their assignment Jan 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants