NullReferenceException at HandleRejoinError

Hi, some times in console we are receiving the following error:

Failed to call hook 'Discord_MemberAdded' on plugin 'DiscordCore v0.16.12' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.DiscordCore.HandleRejoin (System.String discordId) [0x00000] in <a97f6c50a6394ce29a2ef1ddba1a0d20>:0
at Oxide.Plugins.DiscordCore.Discord_MemberAdded (Oxide.Ext.Discord.DiscordObjects.GuildMember member) [0x0000c] in <a97f6c50a6394ce29a2ef1ddba1a0d20>:0
at Oxide.Plugins.DiscordCore.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00953] in <a97f6c50a6394ce29a2ef1ddba1a0d20>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <3606d2af539c45e4b5c61658e6a8b307>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 

I don't know what happens, we have DiscordAuth and DiscordSync installed for managing the sync.

Can you share your config? Be sure to remove your API Key before doing so. I have an idea of what's going on but just want to confirm.

MJSU

Can you share your config? Be sure to remove your API Key before doing so. I have an idea of what's going on but just want to confirm.

Sure, this is the config file:

{
  "Discord API Key": "",
  "Enable Discord Extension Debugging": false,
  "Bot Guild ID (Can be left blank if bot in only 1 guild)": "",
  "Discord Join Code": "xxxxxxxxx",
  "Discord Server Name Override": "xxxxxxxxx",
  "Enable Commands In Bot Channel": false,
  "Bot Channel Name or Id": "bot",
  "In Game Chat Command": "dc",
  "In Game Join Command": "join",
  "In Game Leave Command": "leave",
  "Discord Bot Join Command": "join",
  "Discord Bot Plugins Command": "plugins",
  "Discord Bot Help Command": "help",
  "Discord Bot Leave Command": "leave",
  "Discord Bot Commands Command": "commands",
  "Enable Discord Server Join Notification": false,
  "Enable Linking Discord To Rust": false,
  "Use DiscordAuth": true,
  "Use DiscordConnect": false,
  "Use External Hooks": false,
  "Discord Linking Code Characters": "0123456789",
  "Discord Linking Code Length": 6,
  "Time until heartbeat is considered to have timed out.": 120
}

The issues should be resolved in version 0.17.0

MJSU

The issues should be resolved in version 0.17.0

Hi MJSU, now I see the following sometimes:

Failed to call hook 'Discord_MemberRemoved' on plugin 'DiscordCore v0.17.0' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.DiscordCore.Discord_MemberRemoved (Oxide.Ext.Discord.DiscordObjects.GuildMember member) [0x00026] in <065f35212c5f43aaa47ce064fa342c0e>:0
at Oxide.Plugins.DiscordCore.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00744] in <065f35212c5f43aaa47ce064fa342c0e>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <3606d2af539c45e4b5c61658e6a8b307>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0