discord-net/Discord.Net

[Bug]: Can't respond to interaction

Wqffles-com opened this issue · 2 comments

Check The Docs

  • I double checked the docs and couldn't find any useful information.

Verify Issue Source

  • I verified the issue was caused by Discord.Net.

Check your intents

  • I double checked that I have the required intents.

Description

I can't respond to slash commands.

NOTE: I understand this error, however I respond in way less than 3 seconds. The first line of code is RespondAsync("ok");

Version

3.13.0

Working Version

No response

Logs

18:05:33 App Command System.TimeoutException: Cannot respond to an interaction after 3 seconds!
   at Discord.WebSocket.SocketCommandBase.RespondAsync(String text, Embed[] embeds, Boolean isTTS, Boolean ephemeral, AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options)
   at Discord.WebSocket.SocketInteraction.Discord.IDiscordInteraction.RespondAsync(String text, Embed[] embeds, Boolean isTTS, Boolean ephemeral, AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options)
   at RottenAngels.Commands.SlashCommands.DieCommand(String dyingReason) in C:\Programming\C#\RottenAngels\Commands\SlashCommands.cs:line 160
   at Discord.Interactions.Builders.ModuleClassBuilder.<>c__DisplayClass11_0.<<CreateCallback>g__ExecuteCallback|1>d.MoveNext()
18:05:33 App Command Executed Slash Command: "die" for dutchslav in ?Rotten Angels?/
18:05:34 Gateway     Received Dispatch (PRESENCE_UPDATE)

Sample

    public async Task DieCommand([Summary(description: "What did you die to?")] string? dyingReason = null)
    {
        await RespondAsync("ok");

Packages

JetBrains.Annotations 2023.3.0
Microsoft.Extensions.DependencyInjection 8.0.0
Microsoft.Extensions.DependencyInjection.Abstraction 8.0.0

Environment

  • OS: Windows 11
  • Arch: x64
  • SDK: 8.0.101

Sync your system clock with a NTP server

Alternatively you could set UseInteractionSnowflakeDate = false in your DiscordSocketConfig

Closing due to lack of followup. If the issue has not been resolved feel free to reopen the issue.