Making connection more efficient with "with" statement

pull/4/head
sgoudham 4 years ago
parent fe25dc72f2
commit 84f376465d

@ -1,5 +1,6 @@
import textwrap import textwrap
import discord
from PIL import Image, ImageDraw, ImageFont from PIL import Image, ImageDraw, ImageFont
from discord.ext import commands from discord.ext import commands
from discord.ext.commands import command, cooldown, BucketType from discord.ext.commands import command, cooldown, BucketType
@ -53,10 +54,7 @@ class Fun(commands.Cog):
async def homies(self, ctx, *, user_word): async def homies(self, ctx, *, user_word):
"""Allows people to summon the homies""" """Allows people to summon the homies"""
await ctx.send("This command is under construction." if len(user_word) >= 20:
"\nPlease wait till I say it's ready before using it lmao")
"""if len(user_word) >= 20:
await ctx.send("Please make sure the prompt is below **20** characters!") await ctx.send("Please make sure the prompt is below **20** characters!")
return return
else: else:
@ -66,7 +64,7 @@ class Fun(commands.Cog):
generate_meme('homies/AllMyHomies.jpg', top_text=top_text, bottom_text=bottom_text) 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): def setup(bot):

Loading…
Cancel
Save