discord-net/Discord.Net

[Bug]: NullReferenceException on interaction creation

JustRoxy 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

Entitlement API causes null reference exception on INTERACTION_CREATE.
(Discord removed entitlements from the interaction creation response a few hours ago, I suppose)

Version

3.15.2

Working Version

No response

Logs

Error handling Dispatch (INTERACTION_CREATE)
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at Discord.WebSocket.SocketInteraction.Update(Interaction model)
   at Discord.WebSocket.SocketCommandBase.Update(Interaction model)
   at Discord.WebSocket.SocketSlashCommand.Create(DiscordSocketClient client, Interaction mod
el, ISocketMessageChannel channel, SocketUser user)
   at Discord.WebSocket.SocketInteraction.Create(DiscordSocketClient client, Interaction mode
l, ISocketMessageChannel channel, SocketUser user)
   at Discord.WebSocket.DiscordSocketClient.ProcessMessageAsync(GatewayOpCode opCode, Nullabl
e`1 seq, String type, Object payload)

Sample

No response

Packages

No 3rd party Discord packages

Environment

OS: Ubuntu 22.04.4 LTS
Architecture: x64
.NET: 8.0.5

Can you try again? 10 minutes ago I had the same problem but now when I run the command again I don't see it anymore. It's amazing :v

Thx @tnkbang
Fixed, probably discord shenanigans.
A little bit clearer error reporting would be better tho, but it is what it is