asyncio.create_task
Browse files
app.py
CHANGED
@@ -31,8 +31,13 @@ bot = commands.Bot(command_prefix='!', intents=intents)
|
|
31 |
@bot.command()
|
32 |
async def jojo(ctx):
|
33 |
attachment = await discord_before(ctx)
|
|
|
|
|
|
|
|
|
|
|
34 |
im = await generation(attachment)
|
35 |
-
await discord_after(ctx, im)
|
36 |
|
37 |
async def discord_before(ctx):
|
38 |
if ctx.message.attachments:
|
@@ -43,7 +48,7 @@ async def discord_before(ctx):
|
|
43 |
else:
|
44 |
await ctx.send(f"{ctx.author.mention} No attachments to be found... Can't animify dat! Try sending me an image π")
|
45 |
await ctx.message.add_reaction('β')
|
46 |
-
return
|
47 |
|
48 |
async def generation(attachment):
|
49 |
if attachment:
|
|
|
31 |
@bot.command()
|
32 |
async def jojo(ctx):
|
33 |
attachment = await discord_before(ctx)
|
34 |
+
if attachment:
|
35 |
+
asyncio.create_task(process_jojo(ctx, attachment))
|
36 |
+
|
37 |
+
|
38 |
+
async def process_jojo(ctx, attachment):
|
39 |
im = await generation(attachment)
|
40 |
+
await discord_after(ctx, im)
|
41 |
|
42 |
async def discord_before(ctx):
|
43 |
if ctx.message.attachments:
|
|
|
48 |
else:
|
49 |
await ctx.send(f"{ctx.author.mention} No attachments to be found... Can't animify dat! Try sending me an image π")
|
50 |
await ctx.message.add_reaction('β')
|
51 |
+
return None
|
52 |
|
53 |
async def generation(attachment):
|
54 |
if attachment:
|