Remove !gdq

This commit is contained in:
Daan Boerlage 2021-08-11 17:58:45 +02:00
parent 9a55d8447f
commit f22956368b
Signed by: daan
GPG key ID: FCE070E1E4956606

View file

@ -1,36 +0,0 @@
using System;
using System.Net;
using System.Threading.Tasks;
using Discord.Commands;
using Geekbot.Core.ErrorHandling;
namespace Geekbot.Bot.Commands.Randomness
{
public class Gdq : ModuleBase
{
private readonly IErrorHandler _errorHandler;
public Gdq(IErrorHandler errorHandler)
{
_errorHandler = errorHandler;
}
[Command("gdq", RunMode = RunMode.Async)]
[Summary("Get a quote from the GDQ donation generator.")]
public async Task GetQuote()
{
try
{
using var client = new WebClient();
var url = new Uri("http://taskinoz.com/gdq/api/");
var response = client.DownloadString(url);
await ReplyAsync(response);
}
catch (Exception e)
{
await _errorHandler.HandleCommandException(e, Context);
}
}
}
}