From 84f376465de36b0ca7b03dcb457ea23ac2f16ef0 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Fri, 10 Jul 2020 23:11:40 +0100 Subject: [PATCH] Making connection more efficient with "with" statement --- cogs/fun/homies.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cogs/fun/homies.py b/cogs/fun/homies.py index 48f18907..10b9b1a3 100644 --- a/cogs/fun/homies.py +++ b/cogs/fun/homies.py @@ -1,5 +1,6 @@ import textwrap +import discord from PIL import Image, ImageDraw, ImageFont from discord.ext import commands from discord.ext.commands import command, cooldown, BucketType @@ -53,10 +54,7 @@ class Fun(commands.Cog): async def homies(self, ctx, *, user_word): """Allows people to summon the homies""" - await ctx.send("This command is under construction." - "\nPlease wait till I say it's ready before using it lmao") - - """if len(user_word) >= 20: + if len(user_word) >= 20: await ctx.send("Please make sure the prompt is below **20** characters!") return else: @@ -66,7 +64,7 @@ class Fun(commands.Cog): generate_meme('homies/AllMyHomies.jpg', top_text=top_text, bottom_text=bottom_text) - await ctx.send(file=discord.File('meme-AllMyHomies.jpg'))""" + await ctx.send(file=discord.File('meme-AllMyHomies.jpg')) def setup(bot):