Exemple #1
0
        public async Task SetStoreUrl(string storeUrl = null)
        {
            var config = TranslateService.GetTranslateConfig();

            config.StoreUrl = storeUrl;
            await ReplyAsync("Store url set.");

            TranslateService.SaveTranslateConfig(config);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }