mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 01:01:30 +00:00
Stop doubling the message key
This commit is contained in:
parent
bdc61a4068
commit
8a9b6cbdb5
1 changed files with 1 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ class DiscordAPIError extends Error {
|
||||||
let messages = [];
|
let messages = [];
|
||||||
|
|
||||||
for (const k of Object.keys(obj)) {
|
for (const k of Object.keys(obj)) {
|
||||||
|
if (k === 'message') continue;
|
||||||
const newKey = key ? isNaN(k) ? `${key}.${k}` : `${key}[${k}]` : k;
|
const newKey = key ? isNaN(k) ? `${key}.${k}` : `${key}[${k}]` : k;
|
||||||
|
|
||||||
if (obj[k]._errors) {
|
if (obj[k]._errors) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue