Skip to content
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

DSharpPlusNightly: Failed to compare two elements in the array #163

Open
milesring opened this issue Jul 17, 2024 · 0 comments
Open

DSharpPlusNightly: Failed to compare two elements in the array #163

milesring opened this issue Jul 17, 2024 · 0 comments

Comments

@milesring
Copy link

Describe the bug
Command fails to execute once IAudioService is injected into the class.

at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 keys, Comparison`1 comparer)
...
DSharpPlus.Commands.DefaultCommandExecutor.ExecuteCoreAsync(CommandContext context)

To Reproduce
Steps to reproduce the behavior:

  1. Configure services and build service collection
            services.AddLavalink();
            services.ConfigureLavalink(config =>{//configure lavalink });
  1. Inject IAudioService into command class
        public TestCommands(ILogger<TestCommands> logger, IAudioService audioService)
        {
            _logger = logger;
            _audioService = audioService;
        }
  1. Execute command, in my case SlashCommand /test
        [Command("test")]
        public async Task TestCommandExecuteAsync(SlashCommandContext context)
        {
            //command actions
         }
  1. Removing the injection of IAudioService removes the error.

Expected behavior
Command executes as designed

Packages

  • DSharpPlus 5.0.0-nightly-02317
  • Lavalink4NET 4.0.19-beta.6
  • Lavalink4NET.DSharpPlus.Nightly 4.0.19-beta.6
    or
  • Lavalink4NET.DSharpPlus 4.0.19-beta.6
  • Exception thrown? (consider enabling logging)

Additional context
StackTrace.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant