Skip to content

Add support for Twitch command attribute to work on methods with variable number of parameters (or arrays as parameters) #20

@danqzq

Description

@danqzq

Consider the example below:

[TwitchCommand("info", "i")]
public void Info(params string[] phrase) {
    // Parse phrase
}

Expected behavior

Viewers should be able to pass variable amount of arguments for this command, e.g:

!info hello - would result in phrase containing one element - "hello"

!info hello world - in this case phrase: {"hello", "world"}

!info twitch chat interactions - subsequently: phrase: {"twitch", "chat", "interactions"}


This is a pretty heavy task, so feel free to consult for advice and guidance if you're willing to contribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions