NullReferenceException at DiscordObjects.Channel.GetChannelError
Hi. I really want to start using this plugin, but due to the amount of errors in console I can't at the moment.

It seems just about every feature is causing error spam in console.

Player joins.

(15:38:12) | Failed to call hook 'OnPlayerInit' on plugin 'Rustcord v1.1.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Ext.Discord.DiscordObjects.Channel.GetChannel (Oxide.Ext.Discord.DiscordClient client, System.String channelID, System.Action`1[T] callback) [0x00001] in <a5b2f558069e40f7b83de551a4df08a5>:0 
  at Oxide.Plugins.Rustcord+<OnPlayerInit>c__AnonStorey1.<>m__0 (Oxide.Plugins.Rustcord+Settings+Channel ch) [0x00011] in <9f6f94d817bb402994cb70630dcca519>:0 
  at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <e1a80661d61443feb3dbdaac88eeb776>:0 
  at Oxide.Plugins.Rustcord.OnPlayerInit (BasePlayer player) [0x00046] in <9f6f94d817bb402994cb70630dcca519>:0 
  at Oxide.Plugins.Rustcord.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001f8] in <9f6f94d817bb402994cb70630dcca519>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0​

Player chat.

(15:50:15) | Failed to call hook 'OnPlayerChat' on plugin 'Rustcord v1.1.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Ext.Discord.DiscordObjects.Channel.GetChannel (Oxide.Ext.Discord.DiscordClient client, System.String channelID, System.Action`1[T] callback) [0x00001] in <a5b2f558069e40f7b83de551a4df08a5>:0 
  at Oxide.Plugins.Rustcord+<OnPlayerChat>c__AnonStorey0.<>m__0 (Oxide.Plugins.Rustcord+Settings+Channel ch) [0x00011] in <9f6f94d817bb402994cb70630dcca519>:0 
  at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <e1a80661d61443feb3dbdaac88eeb776>:0 
  at Oxide.Plugins.Rustcord.OnPlayerChat (ConsoleSystem+Arg arg) [0x0015e] in <9f6f94d817bb402994cb70630dcca519>:0 
  at Oxide.Plugins.Rustcord.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001cd] in <9f6f94d817bb402994cb70630dcca519>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0​


Player disconnect.

(15:45:12) | Failed to call hook 'OnPlayerDisconnected' on plugin 'Rustcord v1.1.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Ext.Discord.DiscordObjects.Channel.GetChannel (Oxide.Ext.Discord.DiscordClient client, System.String channelID, System.Action`1[T] callback) [0x00001] in <a5b2f558069e40f7b83de551a4df08a5>:0 
  at Oxide.Plugins.Rustcord+<OnPlayerDisconnected>c__AnonStorey2.<>m__0 (Oxide.Plugins.Rustcord+Settings+Channel ch) [0x00011] in <9f6f94d817bb402994cb70630dcca519>:0 
  at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <e1a80661d61443feb3dbdaac88eeb776>:0 
  at Oxide.Plugins.Rustcord.OnPlayerDisconnected (BasePlayer player, System.String reason) [0x0004d] in <9f6f94d817bb402994cb70630dcca519>:0 
  at Oxide.Plugins.Rustcord.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00226] in <9f6f94d817bb402994cb70630dcca519>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0


I really hope to see these fixed soon. I'm sure it's a brilliant plugin.

Thanks
-Zilch

I am getting this error as well (09:35:34) | Failed to call hook 'OnPlayerDisconnected' on plugin 'Rustcord v1.1.1' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Ext.Discord.DiscordObjects.Channel.GetChannel (Oxide.Ext.Discord.DiscordClient client, System.String channelID, System.Action`1[T] callback) [0x00001] in :0 at Oxide.Plugins.Rustcord+c__AnonStorey2.<>m__0 (Oxide.Plugins.Rustcord+Settings+Channel ch) [0x00011] in <91ff776993f04172a964ce5354a72899>:0 at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in :0 at Oxide.Plugins.Rustcord.OnPlayerDisconnected (BasePlayer player, System.String reason) [0x0004d] in <91ff776993f04172a964ce5354a72899>:0 at Oxide.Plugins.Rustcord.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00226] in <91ff776993f04172a964ce5354a72899>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0 (09:36:08) | Unloaded plugin Rustcord v1.1.1 by Kirollos & OuTSMoKE (09:36:08) | Failed to initialize plugin 'Rustcord v1.1.1' (InvalidOperationException: Collection was modified; enumeration operation may not execute.) at System.ThrowHelper.ThrowInvalidOperationException (System.ExceptionResource resource) [0x0000b] in :0 at System.Collections.Generic.List`1+Enumerator[T].MoveNextRare () [0x00013] in :0 at System.Collections.Generic.List`1+Enumerator[T].MoveNext () [0x0004a] in :0 at Oxide.Plugins.Rustcord.Loaded () [0x000a1] in <91ff776993f04172a964ce5354a72899>:0 at Oxide.Plugins.Rustcord.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0028f] in <91ff776993f04172a964ce5354a72899>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 at Oxide.Plugins.CSharpPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x0006e] in <9affce1cd15c4ec183941adef8db1722>:0
Same over here.
same here.
Can we please get something here @OuTSMoKE... even that your looking into this?
This is being looked into.
Is it possible to post a video or more details on how to hook this into discord. I mean the Rustcord.json file how to set it up exactly to work.

We have the Rustcord Initialized! coming to our discord channel, but no deathnotes are appearing and not sure if we have to setup groups or not from BetterChat in order for any chat comments to be sent to discord? We have roles setup, groups and permissions setup. 

Can someone please help that has this working??
@theonecsm36 please re read this particular post as it clearly stated that this addon is currently broken and is being looked into to get working again...

Hey,

Getting this on every messgae which is killing my server:

 

Failed to call hook 'OnPlayerChat' on plugin 'Rustcord v1.1.1' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Ext.Discord.DiscordObjects.Channel.GetChannel (Oxide.Ext.Discord.DiscordClient client, System.String channelID, System.Action`1[T] callback) [0x00001] in <a5b2f558069e40f7b83de551a4df08a5>:0

at Oxide.Plugins.Rustcord+<OnPlayerChat>c__AnonStorey0.<>m__0 (Oxide.Plugins.Rustcord+Settings+Channel ch) [0x00011] in <6f432e2c40634d55ad47019e12ab0bd6>:0

at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <ac823e2bb42b41bda67924a45a0173c3>:0

at Oxide.Plugins.Rustcord.OnPlayerChat (ConsoleSystem+Arg arg) [0x0015e] in <6f432e2c40634d55ad47019e12ab0bd6>:0

at Oxide.Plugins.Rustcord.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001cd] in <6f432e2c40634d55ad47019e12ab0bd6>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0

(22:47:03) | [Better Chat] [DISC] .SaN.: rip


Any help?

@tomhud I am still getting 

 

Failed to call hook 'OnPlayerChat' on plugin 'Rustcord v1.1.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Ext.Discord.DiscordObjects.Channel.GetChannel (Oxide.Ext.Discord.DiscordClient client, System.String channelID, System.Action`1[T] callback) [0x00001] in :0
at Oxide.Plugins.Rustcord+c__AnonStorey0.<>m__0 (Oxide.Plugins.Rustcord+Settings+Channel ch) [0x00011] in :0
at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in :0
at Oxide.Plugins.Rustcord.OnPlayerChat (ConsoleSystem+Arg arg) [0x0015e] in :0
at Oxide.Plugins.Rustcord.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001cd] in :0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0

Any ideas how to fix? The plugin is working on my other server