#error 10062 Unknown interaction when running the Bot on a Raspberry Pi

1 messages · Page 1 of 1 (latest)

crimson wedge
#

Hey, I'm running my Discord Bot on a Raspberry Pi and get the following error when using a slash command

App Command Discord.Net.HttpException: The server responded with error 10062: Unknown interaction
at Discord.Net.Queue.RequestBucket.SendAsync(RestRequest request)
at Discord.Net.Queue.RequestQueue.SendAsync(RestRequest request)
at Discord.API.DiscordRestApiClient.SendInternalAsync(String method, String endpoint, RestRequest request)
at Discord.API.DiscordRestApiClient.SendJsonAsync(String method, String endpoint, Object payload, BucketId bucketId, ClientBucketType clientBucket, RequestOptions options)
at Discord.API.DiscordRestApiClient.CreateInteractionResponseAsync(InteractionResponse response, UInt64 interactionId, String interactionToken, RequestOptions options)
at Discord.WebSocket.SocketCommandBase.DeferAsync(Boolean ephemeral, RequestOptions options)
at Discord.Interactions.InteractionModuleBase`1.DeferAsync(Boolean ephemeral, RequestOptions options)
at ManfredHorst.Modules.InteractionModule.ShowAlarms() in /home/pi/discord-bot-csharp/ManfredHorst/Modules/InteractionModule.cs:line 25
at Discord.Interactions.Builders.ModuleClassBuilder.<>c__DisplayClass11_0.<<CreateCallback>g__ExecuteCallback|1>d.MoveNext()

The very same Command works when i use it the second time

this is how my command looks like

[SlashCommand("show-alarms", "Shows your current alarms")]
public async Task ShowAlarms()
{
    await DeferAsync();
    await ModifyOriginalResponseAsync(x => x.Embeds = this.BuildEmbed().ToArray());
}

I tried using DeferAsync followed by a ModifyOriginalResponseAsync but couldn't get it to run in combination with my Pi
Im not even sure if the Pi is the problem but everything works fine when i use it on my local Windows machine

old jackal
#

Use respondasync

#

Without the defer

#

You're probably using modify with a componentinteraction which is why it works

crimson wedge
#

I read about the 3 seconds response rule which was my initial problem when using the Bot on my Pi and looked in here and found some post saying i should use DeferAsync to be able to extend the response time to 15 minutes

If i was using RespondAsync how would i make the 15 minutes thing possible?

old jackal
#

Use followup instead of respond after a defer

#

You still have to acknowledge the interaction within 3 seconds, which means receiving it to respond to it

#

If it's unable to do that, make sure your time is synced to ntp