private async Task Ready(DiscordSocketClient client) { try { await _lavalinkManager.StartAsync(); } catch (Exception e) { Console.WriteLine(e.ToString()); } _httpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue(_client.CurrentUser.Username)); PublicVariables.Application = await _client.GetApplicationInfoAsync(); }
private async Task Ready() { await _client.SetGameAsync(Variables.ProgramVersion); await _lavalinkManager.StartAsync(); Database.SyncDatabase(_client); ///////////////////////// }
private async Task ShardReady(DiscordSocketClient client) { _shardsConnected++; if (_shardsConnected == _client.Shards.Count) { await SetupBot(); await _lavaLink.StartAsync(); await _lib.EdgyLog(LogSeverity.Info, $"All Shards Connected ({_client.Shards.Count})"); } }
// Initializes Discord.Net private async Task Start() { _client = new DiscordSocketClient(); _handler = new MessageHandler(_client); lavalinkManager = new LavalinkManager(_client); await _handler.Init(); await _client.LoginAsync(TokenType.Bot, _token); await _client.StartAsync(); _client.Ready += async() => { await lavalinkManager.StartAsync(); }; await Task.Delay(-1); }
private async Task LavalinkStart() => await _lavalink.StartAsync();
private async Task Ready() { await _lavalinkManager.StartAsync(); await _discordBotListHandler.UpdateAsync(); }