can't inject Client on @On("ready")
singatias opened this issue · comments
Mathias Beaulieu-Duncan commented
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 commented
can u post a snippet of your code
SteeledSlagle13 commented
@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
Mathias Beaulieu-Duncan commented
Sorry for the late response. I was missing the []: ArgsOf<"ready"> first part.
Thank You
SteeledSlagle13 commented
np :D