Skip to content

CommandGroup and IsGroupHelp #361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NeekoGta opened this issue Sep 8, 2020 · 0 comments
Closed

CommandGroup and IsGroupHelp #361

NeekoGta opened this issue Sep 8, 2020 · 0 comments
Labels
area-Commands Issues related to player/RCON commands area-GM Issues related to SampSharp.GameMode bug
Milestone

Comments

@NeekoGta
Copy link

NeekoGta commented Sep 8, 2020

I make test with this code :

[CommandGroup("test", "t")]
internal class TestCommandController 
{
    [Command(IsGroupHelp = true)]
    public static void TestHelpCommand(Client client)
    {
        client.SendClientMessage(-1, "/(t)est <option>");
        client.SendClientMessage(-1, "optionOne");
    }

    [Command("optionOne", UsageMessage = "/(t)est optionOne <text>")]
    public static void TestOptionOneCommand(Client client, string text)
    {
        //
    }
}

So, If I only execute /test or /t the method of IsGroupHelp (TestHelpCommand) is called. For the moment, it's normal.

But If I execute /(t)est optionOne but without the parameter text, the method of IsGroupHelp (TestHelpCommand) is called instead of (in my opinion) the UsageMessage of TestOptionOneCommand.

It's normal or we can we improve this?

@ikkentim ikkentim added area-GM Issues related to SampSharp.GameMode bug area-Commands Issues related to player/RCON commands labels Sep 16, 2020
@ikkentim ikkentim added this to the 0.9.0 milestone Sep 16, 2020
@ikkentim ikkentim modified the milestones: 0.9.0, 0.10.0 Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Commands Issues related to player/RCON commands area-GM Issues related to SampSharp.GameMode bug
Projects
None yet
Development

No branches or pull requests

2 participants