Errors Standardization (#1246)

* errors and stuff

* more errors

* all the errors

* fix build
This commit is contained in:
Gus Caplan
2017-06-25 12:48:05 -05:00
committed by Amish Shah
parent 602fe06f88
commit 63e54982f4
28 changed files with 258 additions and 102 deletions

View File

@@ -6,6 +6,7 @@ const Util = require('../util/Util');
const Guild = require('./Guild');
const Message = require('./Message');
const GroupDMChannel = require('./GroupDMChannel');
const { TypeError } = require('../errors');
/**
* Represents the logged in client's Discord user.
@@ -193,7 +194,7 @@ class ClientUser extends User {
}
if (data.status) {
if (typeof data.status !== 'string') throw new TypeError('Status must be a string');
if (typeof data.status !== 'string') throw new TypeError('STATUS_TYPE');
if (this.bot) {
status = data.status;
} else {