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

Undefined return in acceptInvite #1052

Open
3 tasks done
skyslovt opened this issue Feb 14, 2024 · 5 comments
Open
3 tasks done

Undefined return in acceptInvite #1052

skyslovt opened this issue Feb 14, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@skyslovt
Copy link

Which package has the bugs?

The core library

Issue description

There is a chance to return undefined when accepting a invite.
The function works normally, it just doesn't return the invite info.

Code sample

const invite = await client.acceptInvite('discord.gg/invite',{ bypassOnboarding: true, bypassVerify: true });
console.log(invite) // undefined

Package version

3.1.4

Node.js version

v18.18.2

Operating system

Windows 11

Priority this issue should have

Medium (should be fixed soon)

Checklist

  • I have searched the open issues for duplicates.
  • I have shared the entire traceback.
  • I am using a user token (and it isn't visible in the code).

Additional Information

No response

@skyslovt skyslovt added the bug Something isn't working label Feb 14, 2024
@aiko-chan-ai
Copy link
Owner

https://discord.com/api/v9/invites/{code}?with_counts=true&with_expiration=true
tell me the invite info (use GET to this API)

@skyslovt
Copy link
Author

I mean the info from await client.fetchInvite, but returning in await client.acceptInvite

@aiko-chan-ai
Copy link
Owner

I don’t understand ;-; Can you describe this clearly?

@skyslovt
Copy link
Author

I want to get the guild id form the invite but something the acceptInvite return undefined

const invite = await client.acceptInvite('discord.gg/invite',{ bypassOnboarding: true, bypassVerify: true });
console.log(invite)  // undefined
console.log(invite.id)  // undefined

@aiko-chan-ai
Copy link
Owner

very strange .-.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants