ArgumentNullException at GetRoleByNameError
Failed to call hook 'Discord_Ready' on plugin 'DiscordRewards v1.1.7' (ArgumentNullException: Value cannot be null.
Parameter name: source)
  at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate, System.Boolean& found) [0x0000d] in :0 
  at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00000] in :0 
  at Oxide.Plugins.DiscordRewards.GetRoleByName (System.String id) [0x0001d] in :0 
  at Oxide.Plugins.DiscordRewards.Discord_Ready (Oxide.Ext.Discord.DiscordEvents.Ready ready) [0x00000] in :0 
  at Oxide.Plugins.DiscordRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00143] in :0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <33f7c42a56934dae8ec04b11017dce31>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in :0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in :0 
Please provide your config

Getting the same error...  Obviously I have my bot api key on live. 

{
  "Discord bot key (Look at documentation for how to get this)": "summathere",
  "Amount of characters in the code": 6,
  "Command": "verify",
  "Commands to execute when player is verified (use {0} for the player's steamid)": [
    "inventory.giveto {0} wood 100000",
    "inventory.giveto {0} stones 100000",
    "inventory.giveto {0} metal.refined 10000",
    "inventory.giveto {0} metal.fragments 25000",
    "inventory.giveto {0} supply.signal 2",
    "inventory.giveto {0} lmg.m249 1"
  ],
  "Verification Role (role given when verified)": "discord",
  "Erase all verification data on wipe (new map save)?": false,
  "Code character set (code will be generated randomly with these characters)": "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"
}
Try the newest version
 
 
This error shows up when I am attempting to set this up:
(10:54:36) | Failed to call hook 'Discord_Ready' on plugin 'DiscordRewards v1.1.7' (ArgumentNullException: Value cannot be null.
Parameter name: source)
  at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate, System.Boolean& found) [0x0000d] in <b7efe7e6e548497fac3c4a6049a0a4b6>:0 
  at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00000] in <b7efe7e6e548497fac3c4a6049a0a4b6>:0 
  at Oxide.Plugins.DiscordRewards.GetRoleByName (System.String id) [0x0001d] in <bee74ec2b3604cabb09f79b543e5121f>:0 
  at Oxide.Plugins.DiscordRewards.Discord_Ready (Oxide.Ext.Discord.DiscordEvents.Ready ready) [0x00000] in <bee74ec2b3604cabb09f79b543e5121f>:0 
  at Oxide.Plugins.DiscordRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00143] in <bee74ec2b3604cabb09f79b543e5121f>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <33f7c42a56934dae8ec04b11017dce31>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <33287985591c40d6983f0b8f0e915565>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <33287985591c40d6983f0b8f0e915565>:0​

This is my config minus the bot token:

{
  "Command": "verify",
  "Discord bot key (Look at documentation for how to get this)": "YeaIDontThinkSo",
  "Verification Role (role given when verified)": "discord",
  "Commands to execute when player is verified (use {0} for the player's steamid)": [],
  "Amount of characters in the code": 6
}
Reset your config
 
 
Reset your cfg
 
 
Hi birthdates, I'm still getting the same error with v1.1.8.
I deleted my config and let the plugin generate a new one.
With the blank, default config I didn't get an error when I restarted the plugin.
After building my settings back into the config, I'm getting the error again:
(01:32:04) | Failed to call hook 'Discord_Ready' on plugin 'DiscordRewards v1.1.8' (ArgumentNullException: Value cannot be null.
Parameter name: source)
  at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate, System.Boolean& found) [0x0000d] in <b7efe7e6e548497fac3c4a6049a0a4b6>:0 
  at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00000] in <b7efe7e6e548497fac3c4a6049a0a4b6>:0 ​

My config looks like this:

{
  "Command": "verify",
  "Discord bot key (Look at documentation for how to get this)": "HIDDEN_FOR_PASTING",
  "Verification Role (role given when verified)": "discord",
  "Commands to execute when player is verified (use {0} for the player's steamid)": [
    "inventory.giveto {0} scrap 1000",
    "deposit {0} 5000"
  ],
  "Amount of characters in the code": 6
}
Try the newest version, let me know if the issue persists 
 
 

Thanks for the update, birthdates. I'm getting the same error as mediatomcat now.
The Discord role has been created with the same name as is specified in the config.

(21:10:31) | [Discord Rewards] Discord bot connected!
(21:10:31) | Loaded plugin Discord Rewards v1.2.0 by birthdates
(21:10:32) | [Discord Extension] Discord socket opened!
(21:10:32) | [Discord Extension] Your bot was found in 1 Guilds!
(21:10:32) | [Discord Rewards] ERROR: The "" role couldn't be found! Expect further errors!
Can't get role, event if I hardcode it's name to the GetRoleByName method. Something wrong with this method
I'm getting same error when the roles match. However, it appears the verification process is successful. 
[Discord Rewards] ERROR: The "" role couldn't be found! Expect further errors!​