Commands With Arguments (with Spaces)

Not sure if the title describes my question very well, but I want to create 1 command that’ll edit 2 parts of another command. This is to set the name & password of a custom PUBG server. What I have in mind is !setcustom <name> <password> will edit my !custompw command to Name: <name> Password: <password>. While this is possible with the arguments variable, it won’t work if the name of the server has spaces in it. Is there any way to work around this?

@thelarkshark

!addcom -cd=5 !custompw Name: foo Password: bar
!addcom !setcustom -a=!editcom !custompw $(eval a=decodeURIComponent(`$(querystring)`).split(`|`);`Name: `+a[0]+` Password: `+a[1])

Usage: !setcustom [server name] | [password]

Just what I was looking for! Thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.