예제 #1
0
        public DiscordLanguage GetLanguage(string proxy = "", ProxyType proxyType = ProxyType.HTTPS)
        {
            dynamic Resp   = JsonConvert.DeserializeObject(GetBruteInfo(proxy, proxyType));
            string  locale = Resp.locale;

            return(DiscordLanguageTranslator.GetLanguageFromLocale(locale));
        }
예제 #2
0
        public void SetLanguage(DiscordLanguage language, string proxy = "", ProxyType proxyType = ProxyType.HTTPS)
        {
            HttpRequest req = new HttpRequest();

            req.AddHeader("Authorization", token);
            ProxyManager.SimpleChange(req, proxy, proxyType);
            req.Patch($"https://discordapp.com/api/v6/users/@me/settings", "{\"locale\":" + $"\"{DiscordLanguageTranslator.GetLocaleFromLanguage(language)}\"" + "}", "application/json");
        }