FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Variadic arguments in combination with Slash Command Autocompletes result in no input found · Issue #2200 · DSharpPlus/DSharpPlus · GitHub

Variadic arguments in combination with Slash Command Autocompletes result in no input found #2200

Description

Summary

Not sure if this is intended but it (partially) works already.

If one specifies a Slash Command and adds an autocomplete as parameter, specified with the variadic argument attribute, the library is unable to find the autocomplete input of the user and displays a warning message.

What version of the library are you using?

v5.0.0-nightly (make sure you are using the latest nightly!)

What .NET version are you using? Make sure to use the latest patch release for your major version.

.NET 9.0

Operating System

Windows 11 23H2 22635.4515

Reproduction Steps

  1. Create a command with an autocomplete and a variadic argument as parameter
  2. Try to fill the parameter and enter the autocomplete in discord
  3. See the warning coming up in the logs

Trace Logs

Exceptions or other error messages

warn: DSharpPlus.Commands.Processors.BaseCommandProcessor[0] Cannot find the auto complete parameter that the user is currently typing - this should be reported to library developers.

Anything else you'd like to share

Example code for the command:

[Command("autocomplete-test"), Description("Tests the autocomplete functionality with variadic arguments."), RequireGuild)]
public async ValueTask AutocompleteTestAsync
(
    SlashCommandContext context,
    [Description("The autocomplete to test."), SlashAutoCompleteProvider(typeof(TestAutocomplete)), VariadicArgument(10)] string[] tests
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    commandsFor issues related to DSharpPlus.Commands

    Type

    Fields

    Effort

    None yet

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL