#Join VC on Start

1 messages · Page 1 of 1 (latest)

pseudo crest
#

How can i let my Bot join the VoiceChat after the Start.

This is how my code looks rn:
private static async Task OnClientReady(DiscordClient sender, ReadyEventArgs e)
{
ulong voiceChannelId = 1076192774451380360;
var voiceChannel = await sender.GetChannelAsync(voiceChannelId);
await voiceChannel.PlaceMemberAsync((DiscordMember)sender.CurrentUser);
}

modern surge
#

hans tag ready event

gaunt hemlockBOT
# modern surge 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