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

Add asyncIterator support to NodejsStreamOutputAdapter #923

Open
mesmere opened this issue Mar 27, 2024 · 0 comments
Open

Add asyncIterator support to NodejsStreamOutputAdapter #923

mesmere opened this issue Mar 27, 2024 · 0 comments

Comments

@mesmere
Copy link

mesmere commented Mar 27, 2024

discord.js identifies streams by just checking if they have a Symbol.asyncIterator member:

if (typeof resource[Symbol.asyncIterator] === 'function') {

https://github.com/discordjs/discord.js/blob/a1a3a95c94194a8ab789d567a778b376e13ea973/packages/discord.js/src/util/DataResolver.js#L86

Unfortunately the nodejs streams emitted by jszip don't support the asyncIterator pattern, only the older event-based pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant