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

Check if the Client is still online before ending / drawing giveaways based on timestamps #407

Open
Tomato6966 opened this issue Dec 19, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@Tomato6966
Copy link

I think my problem is that the CLIENT is not READY yet / a Shard disconnected (internal Shard)

an easy fix, should in theory be adding a if(client.isReady()) function to ensure that the client actually works

or

use the shardReady shardDisconnect etc. and ready event

Because as you can see the shard got disconnected
image

another reason could be unavailable guilds, check if the guild.available === false (attention it's nullable)
THANKS!

@Tomato6966 Tomato6966 added the enhancement New feature or request label Dec 19, 2021
@Nico105
Copy link
Collaborator

Nico105 commented Dec 20, 2021

For the client it should check every 20s already

if (this.client.readyAt) this._checkGiveaway.call(this);
.
tho to be safe you can try adding a if in the end function separately.
i basically have to ask you to try these possible fixes yourself since I can't repro the issue consistently since I don't manage any big bot anymore where I could test it myself.

@Tomato6966
Copy link
Author

Okay i can try after holidays

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

No branches or pull requests

2 participants