public async Task Sans([Remainder] string nothing = "") { // Change to shortened link // https://dev.bitly.com/get_started.html UserAccount user = UserAccounts.GetAccount(Context.User); int cost = Constants.SansCost; if (user.Currency < cost) { await Context.Channel.SendMessageAsync($"not enough money dumbass you need {cost}."); return; } else { user.AddCurrency(-200); Currency.TryRevertImaginary(user); } user.GetFormattedCurrency(); string json, imageUrl, tags; tags = Functions.GetFormattedTagParams("sans_(undertale)", "rating:e", "type:jpg", "type:png", "order:random&limit=1"); using (WebClient client = new WebClient()) { client.Headers.Add(HttpRequestHeader.UserAgent, "Tpcool ([email protected])"); json = client.DownloadString(Messages.GetAlert("Api.Sans(tags)", tags)); } var dataObject = JsonConvert.DeserializeObject <dynamic>(json); imageUrl = dataObject[0].file_url.ToString(); await Context.Channel.SendMessageAsync(imageUrl); }