private void Loaded() { _settings = Config.ReadObject <Settings>(); if (string.IsNullOrEmpty(_settings.Apikey) || _settings.Apikey == null || _settings.Apikey == "APIkey") { PrintError("API key is empty or invalid!"); return; } foreach (var dc in Discord.Clients) { if (dc.Settings.ApiToken == _settings.Apikey) { Discord.CloseClient(dc); } } //Discord.Clients.Clear(); Discord.CreateClient(this, _settings.Apikey); }
private void Unload() { SaveData(); Discord.CloseClient(_client); }
private void Unload() => Discord.CloseClient(Client);
private void CloseClient() => Discord.CloseClient(Client);
private void Unload() { Discord.CloseClient(Client); SaveData(); }
private void Unload() { Discord.CloseClient(_client); }