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

can't inject Client on @On("ready") #38

Closed
singatias opened this issue Jan 14, 2021 · 4 comments
Closed

can't inject Client on @On("ready") #38

singatias opened this issue Jan 14, 2021 · 4 comments

Comments

@singatias
Copy link

the client is undefined when injected in the ready event. I'm trying to create a channel if it doesn't exist when my bot startup.

@SteeledSlagle13
Copy link
Collaborator

can u post a snippet of your code

@SteeledSlagle13
Copy link
Collaborator

@Once("ready")
onReady([]: ArgsOf<"ready">, client: Client): void {
  //client stuff
}

is how you can do that with the client injection
https://github.com/OwenCalvin/discord.ts#client-payload-injection

@singatias
Copy link
Author

Sorry for the late response. I was missing the []: ArgsOf<"ready"> first part.

Thank You

@SteeledSlagle13
Copy link
Collaborator

np :D

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

2 participants