From f127e0c02ba0552abff4847873cc79020c58b861 Mon Sep 17 00:00:00 2001 From: runebaas Date: Wed, 28 Mar 2018 21:29:42 +0200 Subject: [PATCH] Disable !cat --- Geekbot.net/Commands/Cat.cs | 39 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/Geekbot.net/Commands/Cat.cs b/Geekbot.net/Commands/Cat.cs index 2120fe7..e096f20 100644 --- a/Geekbot.net/Commands/Cat.cs +++ b/Geekbot.net/Commands/Cat.cs @@ -24,25 +24,26 @@ namespace Geekbot.net.Commands { try { - using (var client = new HttpClient()) - { - try - { - client.BaseAddress = new Uri("http://random.cat"); - var response = await client.GetAsync("/meow.php"); - response.EnsureSuccessStatusCode(); - - var stringResponse = await response.Content.ReadAsStringAsync(); - var catFile = JsonConvert.DeserializeObject(stringResponse); - var eb = new EmbedBuilder(); - eb.ImageUrl = catFile.file; - await ReplyAsync("", false, eb.Build()); - } - catch (HttpRequestException e) - { - await ReplyAsync($"Seems like the dog cought the cat (error occured)\r\n{e.Message}"); - } - } +// using (var client = new HttpClient()) +// { +// try +// { +// client.BaseAddress = new Uri("http://random.cat"); +// var response = await client.GetAsync("/meow.php"); +// response.EnsureSuccessStatusCode(); +// +// var stringResponse = await response.Content.ReadAsStringAsync(); +// var catFile = JsonConvert.DeserializeObject(stringResponse); +// var eb = new EmbedBuilder(); +// eb.ImageUrl = catFile.file; +// await ReplyAsync("", false, eb.Build()); +// } +// catch (HttpRequestException e) +// { +// await ReplyAsync($"Seems like the dog cought the cat (error occured)\r\n{e.Message}"); +// } +// } + await ReplyAsync("Command disabled for now because http://random.cat is down"); } catch (Exception e) {