mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 17:21:31 +00:00
update docs for discord api error (#1575)
* aaaaa * Update DiscordAPIError.js
This commit is contained in:
parent
b5de89a973
commit
85ec7c64bc
1 changed files with 2 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Represents an error from the Discord API.
|
* Represents an error from the Discord API.
|
||||||
|
* @extends Error
|
||||||
*/
|
*/
|
||||||
class DiscordAPIError extends Error {
|
class DiscordAPIError extends Error {
|
||||||
constructor(error) {
|
constructor(error) {
|
||||||
|
|
@ -20,6 +21,7 @@ class DiscordAPIError extends Error {
|
||||||
* @param {Object} obj Discord errors object
|
* @param {Object} obj Discord errors object
|
||||||
* @param {string} [key] Used internally to determine key names of nested fields
|
* @param {string} [key] Used internally to determine key names of nested fields
|
||||||
* @returns {string[]}
|
* @returns {string[]}
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
static flattenErrors(obj, key = '') {
|
static flattenErrors(obj, key = '') {
|
||||||
let messages = [];
|
let messages = [];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue