<commit_before>import requests
import io

from PIL import Image as ImageFile, ImageFont, ImageDraw

import discord
from discord.ext import commands


# Source: https://commons.wikimedia.org/wiki/File:Heart_corazón.svg
HEART = "./data/heart.png"


class Draw:
    @commands.command(usage="{@user|url} top text | bottom text")
    async def meme(self, ctx: commands.Context, image_source: str, *args):
        """
        Create a meme from a users avatar
        """
        async with ctx.typing():
            try:
                user = await commands.MemberConverter().convert(ctx, image_source)
                tmp = io.BytesIO(requests.get(user.avatar_url_as(format="png")).content)
            except commands.BadArgument:
                try:
                    tmp = io.BytesIO(requests.get(image_source).content)
                except requests.ConnectionError:
                    await ctx.send(content="Please post either a mention or a url.")
                    return
            tmp2 = io.BytesIO()
            msg_text = await commands.clean_content().convert(ctx, " ".join(args))
            captions = msg_text.upper().split("|")
            if len(captions) == 2:
                top = captions[0].strip()
                bottom = captions[1].strip()
            else:
                top = captions[0].strip()<commit_msg>Handle another command form failure<commit_after>import requests
import requests.exceptions
import io

from PIL import Image as ImageFile, ImageFont, ImageDraw

import discord
from discord.ext import commands


# Source: https://commons.wikimedia.org/wiki/File:Heart_corazón.svg
HEART = "./data/heart.png"


class Draw:
    @commands.command(usage="{@user|url} top text | bottom text")
    async def meme(self, ctx: commands.Context, image_source: str, *args):
        """
        Create a meme from a users avatar
        """
        async with ctx.typing():
            try:
                user = await commands.MemberConverter().convert(ctx, image_source)
                tmp = io.BytesIO(requests.get(user.avatar_url_as(format="png")).content)
            except commands.BadArgument:
                try:
                    tmp = io.BytesIO(requests.get(image_source).content)
                except (requests.ConnectionError, requests.exceptions.MissingSchema):
                    await ctx.send(content="Please post either a mention or a url.")
                    return
            tmp2 = io.BytesIO()
            msg_text = await commands.clean_content().convert(ctx, " ".join(args))
            captions = msg_text.upper().split("|")
            if len(captions) == 2:
                top = captions[0].strip()
                bottom = captions[1].strip()
            else:
                top = captions[0].strip()
{'fraction_non_alphanumeric': 0.1111111111111111, 'fraction_numerical': 0.0036075036075036075, 'mean_word_length': 2.091415830546265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4364981', 'n_tokens_mistral': 772, 'n_tokens_neox': 735, 'n_words': 184}