From 8075ef5d95e5d23399a76cfba138b93cc9686441 Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Mon, 12 Sep 2022 18:41:03 -0700 Subject: [PATCH] Adding a bunch of anime girl functions from the waifu-pics API --- app/cogs/cheeky_functions.py | 14 +++ app/cogs/weeb_shit.py | 211 ++++++++++++++++++++++++++++++----- app/core_utils.py | 8 ++ app/help_methods.py | 61 ++++++++-- 4 files changed, 258 insertions(+), 36 deletions(-) diff --git a/app/cogs/cheeky_functions.py b/app/cogs/cheeky_functions.py index ed4913d1..1b8cc03d 100644 --- a/app/cogs/cheeky_functions.py +++ b/app/cogs/cheeky_functions.py @@ -244,6 +244,20 @@ class Cheeky(commands.Cog): """ ) + @commands.command(name="lewd") + async def lewd(self, ctx: commands.Context): + if not ctx.message.channel.is_nsfw(): + await ctx.send("You can only use this command in NSFW channels") + return + import lewds + + await ctx.send( + embed=core_utils.generate_embed( + embed_url=lewds.get_lewd(), + embed_title="{} is being lewd".format(ctx.message.author.name), + ) + ) + def setup(bot): bot.add_cog(Cheeky(bot)) diff --git a/app/cogs/weeb_shit.py b/app/cogs/weeb_shit.py index 3f8dc03b..8cc1f4e5 100644 --- a/app/cogs/weeb_shit.py +++ b/app/cogs/weeb_shit.py @@ -8,22 +8,22 @@ class Weeb(commands.Cog): def __init__(self, bot): self.bot: commands.Bot = bot - @commands.command(name="wink") - async def wink(self, ctx: commands.Context): - await ctx.reply( - embed=core_utils.generate_embed( - embed_url=requests.get("https://some-random-api.ml/animu/wink").json()[ - "link" - ] - ) - ) + # @commands.command(name="wink") + # async def wink(self, ctx: commands.Context): + # await ctx.reply( + # embed=core_utils.generate_embed( + # embed_url=requests.get("https://some-random-api.ml/animu/wink").json()[ + # "link" + # ] + # ) + # ) - @commands.command(name="smug") - async def smug(self, ctx: commands.Context): + @commands.command(name="pout") + async def pout(self, ctx: commands.Context): await ctx.reply( embed=core_utils.generate_embed( - embed_url=get_from_reddit.get_image("smuganimegirls") + embed_url=core_utils.waifu_pics(endpoint="blush") ) ) @@ -32,7 +32,178 @@ class Weeb(commands.Cog): await ctx.reply( embed=core_utils.generate_embed( - embed_url=get_from_reddit.get_image("pouts") + embed_url=core_utils.waifu_pics(endpoint="blush") + ) + ) + + @commands.command(name="waifu") + async def waifu(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="waifu") + ) + ) + + @commands.command(name="neko") + async def neko(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="neko") + ) + ) + + @commands.command(name="shinobu") + async def shinobu(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="shinobu") + ) + ) + + @commands.command(name="bully") + async def bully(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="bully") + ) + ) + + @commands.command(name="cry") + async def cry(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="cry") + ) + ) + + @commands.command(name="hug") + async def hug(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="hug") + ) + ) + + @commands.command(name="kiss") + async def kiss(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="kiss") + ) + ) + + @commands.command(name="lick") + async def lick(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="lick") + ) + ) + + @commands.command(name="pat") + async def pat(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="pat") + ) + ) + + @commands.command(name="smug") + async def smug(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="smug") + ) + ) + + @commands.command(name="highfive") + async def highfive(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="highfive") + ) + ) + + @commands.command(name="nom") + async def nom(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="nom") + ) + ) + + @commands.command(name="bite") + async def bite(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="bite") + ) + ) + + @commands.command(name="slap") + async def slap(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="slap") + ) + ) + + @commands.command(name="wink") + async def wink(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="wink") + ) + ) + + @commands.command(name="poke") + async def poke(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="poke") + ) + ) + + @commands.command(name="dance") + async def dance(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="dance") + ) + ) + + @commands.command(name="cringe") + async def cringe(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="cringe") + ) + ) + + @commands.command(name="blush") + async def blush(self, ctx: commands.Context): + + await ctx.reply( + embed=core_utils.generate_embed( + embed_url=core_utils.waifu_pics(endpoint="blush") ) ) @@ -43,20 +214,6 @@ class Weeb(commands.Cog): uwu = OwO() await ctx.reply(uwu.whatsthis(" ".join(ctx.message.content.split()[1:]))) - @commands.command(name="lewd") - async def lewd(self, ctx: commands.Context): - if not ctx.message.channel.is_nsfw(): - await ctx.send("You can only use this command in NSFW channels") - return - import lewds - - await ctx.send( - embed=core_utils.generate_embed( - embed_url=lewds.get_lewd(), - embed_title="{} is being lewd".format(ctx.message.author.name), - ) - ) - def setup(bot): bot.add_cog(Weeb(bot)) diff --git a/app/core_utils.py b/app/core_utils.py index b3ee5b5c..77609ef6 100755 --- a/app/core_utils.py +++ b/app/core_utils.py @@ -64,3 +64,11 @@ def gen_username(): return response.split( "div id='gencont'>

" )[1].split("

")[0] + + +def waifu_pics(endpoint, nsfw=False): + pic_type = "nsfw" if nsfw else "sfw" + + return requests.get("https://api.waifu.pics/%s/%s" % (pic_type, endpoint)).json()[ + "url" + ] diff --git a/app/help_methods.py b/app/help_methods.py index 81bcafe6..78ea4a66 100644 --- a/app/help_methods.py +++ b/app/help_methods.py @@ -151,10 +151,6 @@ def get_help_message(method): "Returns some fucky wucky text\n", "\nUsage: !owo what the fuck did you just fucking say about me you little shit?", ], - "pout": [ - "Returns the URL for an anime girl pouting you filthy weeb\n", - "\nUsage: !pout", - ], "rat": ["Returns a random rat photo", "\nUsage: !rat"], "roll": [ "Rolls N number of Y sided die\n", @@ -163,7 +159,6 @@ def get_help_message(method): "\nUsage: !roll 2d20+5", ], "sheeb": ["Returns a picture of a sheeb"], - "smug": ["Returns the URL for smug anime girl"], "source": ["Links you to the git repo with dale-bot's source code"], "stock": [ "Returns basic stock information for the stock you entered. Add -v or --verbose for additional stock info.", @@ -191,7 +186,37 @@ def get_help_message(method): "Searches youtube for the query string and returns the first result", "\nUsage: !youtube sick bmx tricks", ], - "wink": ["returns a anime girl winking at you", "\nUsage: !wink"], + "waifu": [ + "returns an anime girl you can pretend will love you", + "\nUsage: !waifu", + ], + "neko": ["returns a cat anime girl", "\nUsage: !neko"], + "shinobu": [ + "returns a demon anime girl (its ok bro shes totally 5000 years old)", + "\nUsage: !shinobu", + ], + "bully": ["returns a violent anime girl or guy", "\nUsage: !bully"], + "cry": ["returns a crying anime girl", "\nUsage: !cry"], + "hug": ["returns an anime girl hugging you", "\nUsage: !hug"], + "kiss": ["returns an anime kiss (you pathetic virgin)", "\nUsage: !kiss"], + "lick": [ + "returns an anime girl licking someone or something", + "\nUsage: !lick", + ], + "pat": ["returns an anime girl patting someone or something", "\nUsage: !pat"], + "smug": ["returns an anime girl discarding your opinion", "\nUsage: !smug"], + "highfive": ["returns an anime girl(s) high fiving", "\nUsage: !highfive"], + "nom": ["returns an anime girl nomming someone or something", "\nUsage: !nom"], + "bite": ["returns an anime girl biting someone or something", "\nUsage: !bite"], + "slap": [ + "returns an anime girl slapping someone or something", + "\nUsage: !slap", + ], + "wink": ["returns an anime girl winking at you", "\nUsage: !wink"], + "poke": ["returns an anime girl poking someone or something", "\nUsage: !poke"], + "dance": ["returns an anime girl dancing", "\nUsage: !dance"], + "cringe": ["returns an anime girl cringing", "\nUsage: !cringe"], + "blush": ["returns an anime girl blushing", "\nUsage: !blush"], "wordle": ["Link to the worlde app running on my k8s", "\nUsage: !wordle"], "vc": [ "Creates a role and voice channel named whatever you pass in. Only takes one argument\n", @@ -222,15 +247,12 @@ def get_help_embed(bot): "message", "nft", "owo", - "pout", "roll", "simp", - "smug", "sus", "trackdays", "verify", "wasted", - "wink", "wordle", "youtube", ], @@ -265,6 +287,27 @@ def get_help_embed(bot): "redpanda", "sheeb", ], + "pictures of anime girls": [ + "waifu", + "neko", + "shinobu", + "bully", + "cry", + "hug", + "kiss", + "lick", + "pat", + "smug", + "highfive", + "nom", + "bite", + "slap", + "wink", + "poke", + "dance", + "cringe", + "blush", + ], "admin": ["cleanup"], }