Discord.Net: SelfBot doesn't connects anymore.

I had previously a working SelfBot, i didn’t changed the code or anything, and now it’s throw an exception from Client.ConnectAsync();. and i already checked the Token, and the token is correct and its set to TokenType.User. Here the stacktrace:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Discord.WebSocket.DiscordSocketClient.<>c.<SyncGuildsAsync>b__117_0(SocketGuild x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable`1 items)
   at Discord.WebSocket.DiscordSocketClient.<SyncGuildsAsync>d__117.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Discord.WebSocket.DiscordSocketClient.<ProcessMessageAsync>d__114.MoveNext()```

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

Once again, this does not relate to the issue you are commenting on; please stop commenting on unrelated issues on random issue threads, but instead open a new issue, thank you.