async def search_for_images(self, ctx):
    urls = []
    async for message in ctx.channel.history(limit=10):
        if message.attachments:
            for attachment in message.attachments:
                urls.append(attachment.url)
        match = IMAGE_LINKS.match(message.content)
        if match:
            urls.append(match.group(1))
    if (not urls):
        ctx.command.reset_cooldown(ctx)
        raise ValueError(_('No Images found in recent history.'))
    return urls
async def search_for_images(self, ctx):
    urls = []
    async for message in ctx.channel.history(limit=10):
        if message.attachments:
            for attachment in message.attachments:
                urls.append(attachment.url)
        match = IMAGE_LINKS.match(message.content)
        if match:
            urls.append(match.group(1))
    if (not urls):
        ctx.command.reset_cooldown(ctx)
        raise ValueError(_('No Images found in recent history.'))
    return urls