I've tried just putting it into the task that is called when Client.Ready activates. I use exactly the same code as in Commands with CommandContext and it works totally fine there but here it doesn't for some reason. Everything seems to be null / default values in the Guild that gets returned. I guess this initial Client is somehow different to CommandContext but I have no idea how else I could do that
var Server = await Client.GetGuildAsync(...);
#Check if anyone doesn't have a role X on startup and grant it if they don't
1 messages · Page 1 of 1 (latest)
don't put any logic that requires data from discord into Ready, ever, for any reason
hans tag ready-event
Specified tag was not found. Here are some suggestions:
threads, really-fucked-up, read the error, what am i reading, read, ready-event, event-deadlock
hans tag alias "ready event" ready-event
Alias ready event pointing to ready-event was created.
hans tag ready event
The READY event refers to Discord, not the client
tl;dr this event is fired when Discord is ready to start sending gateway events; cache (members/guilds) are populated as these events come in.
You probably want GuildDownloadCompleted instead
The Ready event on the client only signals that your client has completed a handshake with the gateway, and it's ready to start streaming payloads to you.
This isn't to say you should never use it, but for a vast majority of uses, there is no point in using this event, and it simply exists for completeness and correctness.
Gateway documentation: https://discord.dev/topics/gateway-events#ready