question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should Command Groups be separated by a user-defined character, rather than whitespace?

See original GitHub issue

In 1.0’s current implementation of Commands, Modules. Groups, and Commands are separated from eachother by whitespace. For someone’s general usecase, this would not be an issue.

Consider the following scenario:

Module "module"
    Group "group"
        Command "command"
            Remainder String "args"
    Command "group"
        Remainder String "args"

If a user executes ~module group command, which command should the bot execute? In the current implementation, by default, the bot will execute the first match it finds, which would be module -> group. However, what if the user wanted to execute module -> group -> command?

With this proposal, the bot developer will be able to specify a string that should be expected between tokens when searching for a command. For example, the user could now discretely see a difference between: ~module.group.command args and ~module.group command

Thoughts?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
foxbotcommented, Oct 11, 2016

this could be used to imitate a programming language (hell yeah) ~please.kill.me()

1reaction
khionucommented, Oct 10, 2016

I’m all for it. Could make for some very creative uses.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regular Expression to split on spaces unless in quotes
Split method to split this input string into an array. It must split on whitespace unless it is enclosed in a quote. Input:...
Read more >
linux - How to add to group when name has a space?
Group and user names aren't allowed to contain the space character on POSIX-style systems; see Command line login failed with two strings ID ......
Read more >
How do I use cut to separate by multiple whitespace?
I've created a patch that adds new -m command-line option to cut , which works in the field mode and treats multiple consecutive...
Read more >
Documentation: 15: 4.1. Lexical Structure
Tokens are normally separated by whitespace (space, tab, newline), but need not be if there is no ambiguity (which is generally only the...
Read more >
22.3.3. Formatted Output to Character Streams
This parameter controls the number of digits in each group separated by the commachar. By extension, each of the ~B, ~O, and ~X...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found