Skip to content

Commit

Permalink
add more boorus from boorusharp
Browse files Browse the repository at this point in the history
  • Loading branch information
xubiod committed Jan 16, 2024
1 parent bd1e609 commit cfd7045
Showing 1 changed file with 45 additions and 7 deletions.
52 changes: 45 additions & 7 deletions xubot/src/Commands/Connections/ImageBoards.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,22 @@ private class Entry(ulong userId, ulong guildId, string key)
public string Key { get; } = key;
}

private static readonly ABooru Allthefallen = new Atfbooru();
private static readonly ABooru Danbooru = new DanbooruDonmai();
private static readonly ABooru Derpibooru = new Derpibooru();
private static readonly ABooru E621 = new E621();
private static readonly ABooru Rule34 = new Rule34();
private static readonly ABooru Gelbooru = new Gelbooru();
private static readonly ABooru Yandere = new Yandere();
private static readonly ABooru E926 = new E926();
private static readonly ABooru Safebooru = new Safebooru();
private static readonly ABooru Gelbooru = new Gelbooru();
private static readonly ABooru Konachan = new Konachan();
private static readonly ABooru Allthefallen = new Atfbooru();
private static readonly ABooru Sankakucomplex = new SankakuComplex();
private static readonly ABooru Sakugabooru = new Sakugabooru();
private static readonly ABooru Ponybooru = new Ponybooru();
private static readonly ABooru Realbooru = new Realbooru();
private static readonly ABooru Rule34 = new Rule34();
private static readonly ABooru Safebooru = new Safebooru();
private static readonly ABooru Sakugabooru = new Sakugabooru();
private static readonly ABooru Sankakucomplex = new SankakuComplex();
private static readonly ABooru Twibooru = new Twibooru();
private static readonly ABooru Xbooru = new Xbooru();
private static readonly ABooru Yandere = new Yandere();

private static readonly Dictionary<Entry, string> CaughtFromBeingSent = new();

Expand Down Expand Up @@ -151,6 +155,8 @@ public async Task KonachanTask(params string[] inputs)
await GetRandomPostFrom(Context, Konachan, inputs);
}

// TODO: unfuck up these attributes below and give some fucking examples, cannot be arsed to make the website urls right atm

[NsfwPossibility("Is a possibility (although not guaranteed).")]
[Command("atfbooru", RunMode = RunMode.Async), Summary("Retrieves a post from booru.allthefallen.moe. If the last input is a boolean, it counts as a spoiler toggle.")]
public async Task AtfBooruTask(params string[] inputs)
Expand Down Expand Up @@ -183,6 +189,38 @@ public async Task RealbooruTask(params string[] inputs)
await GetRandomPostFrom(Context, Realbooru, inputs);
}

[NsfwPossibility("Is a possibility (although not guaranteed).")]
[Command("derpibooru", RunMode = RunMode.Async), Summary("Retrieves a post from sakugabooru.com. If the last input is a boolean, it counts as a spoiler toggle.")]
public async Task DerpibooruTask(params string[] inputs)
{
using Util.WorkingBlock wb = new(Context);
await GetRandomPostFrom(Context, Derpibooru, inputs);
}

[NsfwPossibility("Is a possibility (although not guaranteed).")]
[Command("ponybooru", RunMode = RunMode.Async), Summary("Retrieves a post from sakugabooru.com. If the last input is a boolean, it counts as a spoiler toggle.")]
public async Task PonybooruTask(params string[] inputs)
{
using Util.WorkingBlock wb = new(Context);
await GetRandomPostFrom(Context, Ponybooru, inputs);
}

[NsfwPossibility("Is a possibility (although not guaranteed).")]
[Command("twibooru", RunMode = RunMode.Async), Summary("Retrieves a post from sakugabooru.com. If the last input is a boolean, it counts as a spoiler toggle.")]
public async Task TwibooruTask(params string[] inputs)
{
using Util.WorkingBlock wb = new(Context);
await GetRandomPostFrom(Context, Twibooru, inputs);
}

[NsfwPossibility("Is a possibility (although not guaranteed).")]
[Command("xbooru", RunMode = RunMode.Async), Summary("Retrieves a post from sakugabooru.com. If the last input is a boolean, it counts as a spoiler toggle.")]
public async Task XbooruTask(params string[] inputs)
{
using Util.WorkingBlock wb = new(Context);
await GetRandomPostFrom(Context, Xbooru, inputs);
}

[Example("00000000")]
[Command("booru-get", RunMode = RunMode.Async), Summary("Gets an image you requested that wasn't appropriate for the original context with a given key.")]
public async Task GetStoredImageUri(string key, bool hide = false)
Expand Down

0 comments on commit cfd7045

Please sign in to comment.