mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Errors Standardization (#1246)
* errors and stuff * more errors * all the errors * fix build
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user