async def fox(self, ctx): async with aiohttp.ClientSession() as cs: async with cs.get('https://randomfox.ca/floof/') as r: res = await r.json() embed = discord.Embed(color=self.bot.embed_color, title="β Random Fox! ") embed.set_image(url=res['image']) await ctx.send(embed=embed) logger.info(f"Images | Sent Fox: {ctx.author}")
async def dog(self, ctx): async with aiohttp.ClientSession() as cs: async with cs.get('https://dog.ceo/api/breeds/image/random') as r: res = await r.json() embed = discord.Embed(color=self.bot.embed_color, title="β Random Dog! π") embed.set_image(url=res['message']) await ctx.send(embed=embed) logger.info(f"Images | Sent Dog: {ctx.author}")
async def cat(self, ctx): async with aiohttp.ClientSession() as cs: async with cs.get('https://some-random-api.ml/img/cat') as r: res = await r.json() embed = discord.Embed(color=self.bot.embed_color, title="β Random Cat! π") embed.set_image(url=res['link']) await ctx.send(embed=embed) logger.info(f"Images | Sent Cat: {ctx.author}")
async def duck(self, ctx): async with aiohttp.ClientSession() as cs: async with cs.get("https://random-d.uk/api/v1/random") as r: res = await r.json() embed = discord.Embed(color=self.bot.embed_color, title="β Random Duck") embed.set_image(url=res['url']) await ctx.send(embed=embed) logger.info(f"Images | Sent Random Duck: {ctx.author}")
async def clyde(self, ctx, *, text): async with aiohttp.ClientSession() as cs: async with cs.get(f"https://nekobot.xyz/api/imagegen?type=clyde&text={text}") as r: res = await r.json() embed = discord.Embed( color=self.bot.embed_color, title="β Clyde Bot π€" ) embed.set_image(url=res['message']) await ctx.send(embed=embed) logger.info(f"Images | Sent Clyde: {ctx.author}")
async def trumptweet(self, ctx, *, text: str): async with aiohttp.ClientSession() as cs: async with cs.get(f"https://nekobot.xyz/api/imagegen?type=trumptweet&text={text}") as r: res = await r.json() embed = discord.Embed( color=self.bot.embed_color, title="β Trump Tweet" ) embed.set_image(url=res["message"]) await ctx.send(embed=embed) logger.info(f"Images | Sent Trump Tweet: {ctx.author} | Text: {text}")
async def redpanda(self, ctx): async with aiohttp.ClientSession() as cs: async with cs.get("https://some-random-api.ml/img/red_panda") as r: res = await r.json() embed = discord.Embed( color=self.bot.embed_color, title="β Random Panda", ) embed.set_image(url=res['link']) await ctx.send(embed=embed) logger.info(f"Images | Sent Panda Image: {ctx.author}")
async def mind(self, ctx, *, text): async with aiohttp.ClientSession() as cs: async with cs.get(f"https://nekobot.xyz/api/imagegen?type=changemymind&text={text}") as r: res = await r.json() embed = discord.Embed( color=self.bot.embed_color, title="β Change My Mind" ) embed.set_image(url=res["message"]) await ctx.send(embed=embed) logger.info(f"Images | Sent mind: {ctx.author}")
async def coffee(self, ctx): async with aiohttp.ClientSession() as cs: async with cs.get("https://coffee.alexflipnote.dev/random.json") as r: res = await r.json() embed = discord.Embed( color=self.bot.embed_color, title="β Daily Coffee", ) embed.set_image(url=res["file"]) await ctx.send(embed=embed) logger.info(f"Images | Sent Coffee: {ctx.author}")
async def bird(self, ctx): async with aiohttp.ClientSession() as cs: async with cs.get(f"https://api.ksoft.si/meme/random-image", params={"tag": "birb"}, headers={"Authorization": f"Bearer {os.environ.get('ksoft_key')}"}) as r: res = await r.json() embed = discord.Embed( color=self.bot.embed_color, title=f"β Random Bird", ) embed.set_image(url=res['url']) await ctx.send(embed=embed) logger.info(f"Images | Sent Random Bird: {ctx.author}")
async def baguette(self, ctx): picture = ctx.author.avatar_url_as(size=1024, format=None, static_format='png') async with aiohttp.ClientSession() as cs: async with cs.get(f"https://nekobot.xyz/api/imagegen?type=baguette&url={picture}") as r: res = await r.json() embed = discord.Embed( color=self.bot.embed_color, title=f"β {ctx.author.name} eating a baguette" ) embed.set_image(url=res["message"]) await ctx.send(embed=embed) logger.info(f"Images | Sent Baguette: {ctx.author}")
async def ph(self, ctx): picture = ctx.author.avatar_url_as(size=1024, format=None, static_format='png') async with aiohttp.ClientSession() as cs: async with cs.get(f"https://nekobot.xyz/api/imagegen?type=phcomment&image={picture}&text=That was pretty sick&username={ctx.author}") as r: res = await r.json() embed = discord.Embed( color=self.bot.embed_color, title="β Cornhub" ) embed.set_image(url=res["message"]) await ctx.send(embed=embed) logger.info(f"Images | Sent PH: {ctx.author}")
async def triggered(self, ctx): picture = ctx.author.avatar_url_as(size=1024, format=None, static_format='png') async with aiohttp.ClientSession() as cs: async with cs.get(f"https://some-random-api.ml/canvas/triggered?avatar={picture}") as r: res = io.BytesIO(await r.read()) triggered_file = discord.File(res, filename=f"triggered.gif") embed = discord.Embed( color=self.bot.embed_color, title="β Triggered", ) embed.set_image(url="attachment://triggered.gif") await ctx.send(embed=embed, file=triggered_file) logger.info(f"Images | Sent Triggered: {ctx.author}")
async def youtube(self, ctx, *, comment): picture = ctx.author.avatar_url_as(size=1024, format=None, static_format='png') async with aiohttp.ClientSession() as cs: async with cs.get(f"https://some-random-api.ml/canvas/youtube-comment?avatar={picture}&username={ctx.author.name}&comment={comment}") as r: res = io.BytesIO(await r.read()) youtube_file = discord.File(res, filename=f"youtube.jpg") embed = discord.Embed( color=self.bot.embed_color, title="β Youtube comment" ) embed.set_image(url="attachment://youtube.jpg") await ctx.send(embed=embed, file=youtube_file) logger.info(f"Images | Sent Youtube: {ctx.author}")
async def iphone(self, ctx, member: discord.Member): picture = member.avatar_url_as(size=1024, format=None, static_format='png') async with aiohttp.ClientSession() as cs: async with cs.get(f"https://nekobot.xyz/api/imagegen?type=iphonex&url={picture}") as r: res = await r.json() print(res) embed = discord.Embed( color=self.bot.embed_color, title=f"β Thats a nice wallpaper of {member}", ) embed.set_image(url=res["message"]) await ctx.send(embed=embed) logger.info(f"Images | Sent Trap {ctx.author}")
async def captcha(self, ctx): avatar = ctx.author.avatar_url_as(size=1024, format=None, static_format='png') async with aiohttp.ClientSession() as cs: async with cs.get(f"https://nekobot.xyz/api/imagegen?type=captcha&url={avatar}&username=Orange") as r: res = await r.json() embed = discord.Embed( color=self.bot.embed_color, title="β Captcha Verification", ) embed.set_image(url=res["message"]) await ctx.send(embed=embed) logger.info(f"Images | Sent Captcha: {ctx.author}")
async def vs(self, ctx, member1: discord.Member, member2: discord.Member): member1 = member1.avatar_url_as(size=1024, format=None, static_format='png') member2 = member2.avatar_url_as(size=1024, format=None, static_format='png') async with aiohttp.ClientSession() as cs: async with cs.get( f"https://nekobot.xyz/api/imagegen?type=whowouldwin&user1={member1}&user2={member2}") as r: res = await r.json() embed = discord.Embed( color=self.bot.embed_color, title="β Who Would Win" ) embed.set_image(url=res["message"]) await ctx.send(embed=embed) logger.info(f"Images | Sent Who Would Win: {ctx.author}")
async def magik(self, ctx, member: discord.Member, intensity: int = 5): avatar = member.avatar_url_as(size=1024, format=None, static_format='png') emoji = ":penguin:" message = await ctx.send(f"{emoji} β **Processing the image please wait!**") await message.delete(delay=3) async with aiohttp.ClientSession() as cs: async with cs.get(f"https://nekobot.xyz/api/imagegen?type=magik&image={avatar}&intensity={intensity}") as r: res = await r.json() embed = discord.Embed( color=self.bot.embed_color, title="β Magik" ) embed.set_image(url=res["message"]) await ctx.send(embed=embed) logger.info(f"Images | Sent Magik: {ctx.author}")