Discord bot fails to launch with gateway version error in C#

I hit this exact same gateway error last year on a project bot. The 4012 close code means Discord killed the gateway version your library’s trying to use. Happens when Discord.Net falls behind Discord’s deprecation schedule. Don’t just update the package - check your target framework too. Newer Discord.Net versions need .NET Core 3.1 or higher. After I updated, I had to tweak a few auth methods since the newer versions changed some syntax, but it wasn’t bad. The Discord.Net GitHub repo has a solid migration guide if you run into breaking changes.