public async Task SetStoreUrl(string storeUrl = null) { var config = TranslateService.GetTranslateConfig(); config.StoreUrl = storeUrl; await ReplyAsync("Store url set."); TranslateService.SaveTranslateConfig(config); }
public async Task SetApiType(TranslateConfig.ApiKey apiKeyType) { var config = TranslateService.GetTranslateConfig(); config.ApiKeyType = apiKeyType; await ReplyAsync("This will take effect after a restart."); TranslateService.SaveTranslateConfig(config); }
public async Task ToggleTranslation() { var config = TranslateService.GetTranslateConfig(); config.Enabled = !config.Enabled; await ReplyAsync($"Translation Enabled: {config.Enabled}\nNOTE: API Key needs to be set in order for translations to run."); TranslateService.SaveTranslateConfig(config); }
public async Task SetApiKey(string apiKey = null) { var config = TranslateService.GetTranslateConfig(); config.APIKey = apiKey; await ReplyAsync("This will take effect after a restart."); TranslateService.SaveTranslateConfig(config); }