mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
Stop doubling the message key
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user