-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
On READY event return null for ClientUser property #2
Comments
Isn't @On('ready')
async onReady(client: Client){
console.log(client.user);
// Do stuff with user
} |
The function is inside a class decorated with @Discord, do i still need to pass in the parameter for Client ? |
Yes. |
Yes you have to use the client parameter on the event function :) Thank's @Fredi100 for the support! |
Problem:
When i try to use the "ready" event, the value for user (UserClient) is null and i cannot use any of the ClientUser instance or method.
Expectation:
We should be able to use it the way the native discord.js module do
bot.on('ready', () => { bot.user.setActivity(...) })
My workaround solution for now:
Much appreciate if you can fix it in the near feature :)
The text was updated successfully, but these errors were encountered: