settings throw errors when missing mandatory properties
This commit is contained in:
parent
feb9df0043
commit
a7bdf10ac5
@ -48,7 +48,10 @@ class Setting extends Component {
|
||||
* @memberof Setting
|
||||
*/
|
||||
constructor(client, options = {}) {
|
||||
if(!options) return null;
|
||||
|
||||
if (!options) throw new Error(`No options provided to setting`);
|
||||
if (!options.name) throw new Error(`Setting missing name`);
|
||||
if (!options.module) throw new Error(`Missing module for ${options.name}`);
|
||||
|
||||
super(client, {
|
||||
id: options.name,
|
||||
|
Loading…
Reference in New Issue
Block a user