FireHead90544/craiyon.py

AttributeError: 'Craiyon' object has no attribute 'async_generate'

DragonFire1230 opened this issue · 2 comments

hello, i have some problems.
i am making discord bot, and i can't call async_generate

here's my code:

async def dall_e_mini(ctx, prompt: str):
    await ctx.response.defer()
    craiyon_gen = Craiyon()

    result = await craiyon_gen.async_generate(prompt)
    await result.async_save_images(path = f".\\temp\\{ctx.author.id}")

    files_to_upload = []

    for file in os.listdir(f'.\\temp\\{ctx.author.id}'):
        files_to_upload.append(discord.File(f'.\\temp\\{ctx.author.id}\\{file}'))
    
    await ctx.send(f'**{prompt}** - {ctx.author.mention}', files=files_to_upload)```

what i do not right?
i'm using Python 3.10.7

i solved in by just downloading source code, and moving to my project

The new version wasn't published to pypi by that time, I'll be doing that now. It'll fix that issue.