Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message#toJSON() issue #7712

Closed
KokoNeotSide opened this issue Mar 25, 2022 · 0 comments · Fixed by #7773
Closed

Message#toJSON() issue #7712

KokoNeotSide opened this issue Mar 25, 2022 · 0 comments · Fixed by #7773

Comments

@KokoNeotSide
Copy link

KokoNeotSide commented Mar 25, 2022

Which package is this bug report for?

discord.js

Issue description

When message is containing embed with author and you call .toJSON on the message rather on the embed itself, and then access the embed property on the generated json, the author property is missing.
When you call toJSON on embed directly, the author property is there. I'd imagine that toJSON would call each objects toJSON separately but i guess thats not the case?

I'd like to request unban on my main account from this repo. Its been a long time, I have not caused any issues and I've reported few bugs already. I've done my sentence

Code sample

const e = new MessageEmbed().setAuthor({ name: 'hey' })
let msg = await message.channel.send({ embeds: [e] })
console.log(msg.toJSON())
console.log(msg.embeds[0].toJSON())

Package version

13.6.0

Node.js version

16.13.0

Operating system

windows 10 pro

Priority this issue should have

Low (slightly annoying)

Which partials do you have configured?

No Partials

Which gateway intents are you subscribing to?

Guilds, GuildMessages

I have tested this issue on a development release

No response

newracket added a commit to newracket/discord.js that referenced this issue Apr 11, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants