#Can't get guild with get_guild
1 messages · Page 1 of 1 (latest)
You shouldn't really be doing anything that involves getting data from the API or from the bot's cache in on_ready.
That was an example. In reality, I need to get guild in loop task. What am i doing wrong here?
Do you have intent.guilds = True? If not, then guilds aren't being cached. Is server_id for sure an int and the correct server ID?
Yes i have. Yes, it is an int
prob its cause on_ready takes time
put a sleep on it or something before checking guild
cached etc
This !
@worthy ginkgoput a sleep like 1min
that will make it fetch guild
They're doing it in a task within a cog. They have the @before. with wait_until_ready()
Well, the problem resolved itself... I was afk for like 1h, and this works now