Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Significant Delay in Slash Command Registration for Guild-Specific Commands #2270

Copy link
Copy link
@InvixGG

Description

@InvixGG
Issue body actions

Summary

Slash command registration experiences a significant delay (up to 30 seconds or longer) after the bot has fully started when registering guild-specific commands. This was not an issue in previous versions of the library.

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

Reproduction Steps

  1. Configure DSharpPlus with the CommandsExtension.

  2. Register slash commands as guild-specific. This can be done by:

    • Using DebugGuildId in CommandsConfiguration.
  3. Start the bot.

  4. Observe the delay between the bot reporting that it has started and the slash commands becoming available in the specified guild(s). This delay can be up to 30 seconds or longer.

Trace Logs


Exceptions or other error messages


Anything else you'd like to share

Code Sample (Registering guild-specific commands using DebugGuildId)

services.AddCommandsExtension((_, extension) =>
{
    extension.AddProcessors(new SlashCommandProcessor());
    extension.AddCommands(CommandRegistrationHelper.GetCommandTypes(Assembly.GetExecutingAssembly()));
}, new CommandsConfiguration
{
#if DEVELOPMENT
    DebugGuildId = {ID}
#endif
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    commandsFor issues related to DSharpPlus.CommandsFor issues related to DSharpPlus.Commands

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.