From d761e0bf10795336f3eac1a81b50d0affba8af41 Mon Sep 17 00:00:00 2001 From: runebaas Date: Wed, 1 May 2019 18:22:44 +0200 Subject: [PATCH] Add some dabbing --- Geekbot.net/Commands/Randomness/RandomAnimals.cs | 7 +++++++ Geekbot.net/Lib/Media/IMediaProvider.cs | 1 + Geekbot.net/Lib/Media/MediaProvider.cs | 14 ++++++++++++++ Geekbot.net/Storage/dab | 8 ++++++++ 4 files changed, 30 insertions(+) create mode 100644 Geekbot.net/Storage/dab diff --git a/Geekbot.net/Commands/Randomness/RandomAnimals.cs b/Geekbot.net/Commands/Randomness/RandomAnimals.cs index 38061b1..8562908 100644 --- a/Geekbot.net/Commands/Randomness/RandomAnimals.cs +++ b/Geekbot.net/Commands/Randomness/RandomAnimals.cs @@ -64,6 +64,13 @@ namespace Geekbot.net.Commands.Randomness { await ReplyAsync("", false, Eb(_mediaProvider.GetFox())); } + + [Command("dab", RunMode = RunMode.Async)] + [Summary("Get a random dab image")] + public async Task Dab() + { + await ReplyAsync("", false, Eb(_mediaProvider.GetDab())); + } private static Embed Eb(string image) { diff --git a/Geekbot.net/Lib/Media/IMediaProvider.cs b/Geekbot.net/Lib/Media/IMediaProvider.cs index 79c6c98..a646cea 100644 --- a/Geekbot.net/Lib/Media/IMediaProvider.cs +++ b/Geekbot.net/Lib/Media/IMediaProvider.cs @@ -10,5 +10,6 @@ string GetTurtle(); string GetPinguin(); string GetFox(); + string GetDab(); } } \ No newline at end of file diff --git a/Geekbot.net/Lib/Media/MediaProvider.cs b/Geekbot.net/Lib/Media/MediaProvider.cs index 7f883ae..c88b696 100644 --- a/Geekbot.net/Lib/Media/MediaProvider.cs +++ b/Geekbot.net/Lib/Media/MediaProvider.cs @@ -16,6 +16,7 @@ namespace Geekbot.net.Lib.Media private string[] _turtlesImages; private string[] _pinguinImages; private string[] _foxImages; + private string[] _dabImages; public MediaProvider(IGeekbotLogger logger) { @@ -32,6 +33,7 @@ namespace Geekbot.net.Lib.Media LoadTurtles(); LoadPinguins(); LoadFoxes(); + LoadDab(); } private void LoadCheckem() @@ -90,6 +92,13 @@ namespace Geekbot.net.Lib.Media _logger.Trace(LogSource.Geekbot, $"Loaded {_foxImages.Length} Foxes Images"); } + private void LoadDab() + { + var rawLinks = File.ReadAllText(Path.GetFullPath("./Storage/dab")); + _dabImages = rawLinks.Split("\n"); + _logger.Trace(LogSource.Geekbot, $"Loaded {_dabImages.Length} Dab Images"); + } + public string GetCheckem() { return _checkemImages[_random.Next(0, _checkemImages.Length)]; @@ -129,5 +138,10 @@ namespace Geekbot.net.Lib.Media { return _foxImages[_random.Next(0, _foxImages.Length)]; } + + public string GetDab() + { + return _dabImages[_random.Next(0, _dabImages.Length)]; + } } } \ No newline at end of file diff --git a/Geekbot.net/Storage/dab b/Geekbot.net/Storage/dab new file mode 100644 index 0000000..cba5a5c --- /dev/null +++ b/Geekbot.net/Storage/dab @@ -0,0 +1,8 @@ +https://pre00.deviantart.net/dcde/th/pre/i/2018/247/8/1/dabbing_pug_cute_dab_dance_by_manekibb-dcm2lvd.png +https://banner2.kisspng.com/20180625/xfv/kisspng-squidward-tentacles-dab-desktop-wallpaper-dab-emoji-5b31a97a839bf2.6353972915299813065391.jpg +https://djbooth.net/.image/t_share/MTUzNDg2MDIzOTU4NzM0NzA1/life-death-of-dab-dancejpg.jpg +https://res.cloudinary.com/teepublic/image/private/s--gfsWHvaH--/t_Preview/b_rgb:262c3a,c_limit,f_jpg,h_630,q_90,w_630/v1493209189/production/designs/1524888_1.jpg +https://i1.wp.com/fortniteskins.net/wp-content/uploads/2018/04/dab-skin-1.png?quality=90&strip=all&ssl=1 +https://i.pinimg.com/originals/12/d4/0a/12d40a8fc66b7a7ea8b9044ee0303974.png +https://images.bewakoof.com/t540/dab-penguin-boyfriend-t-shirt-women-s-printed-boyfriend-t-shirts-196918-1538034349.jpg +https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSKH1FLh5L3pOR2tamx-5OBqm_W2FFl8F7gteTAs2vMowwJ1Y32 \ No newline at end of file