lunarflu HF Staff commited on
Commit
0ea249e
Β·
1 Parent(s): c378b04

[decorators] simplifying jojo, no threads

Browse files
Files changed (1) hide show
  1. app.py +8 -17
app.py CHANGED
@@ -45,24 +45,15 @@ async def on_ready():
45
 
46
  #----------------------------------------------------------------------------------------------------------------------------------------------
47
  # jojo
48
- @bot.command
49
- async def jojo(ctx): # needs safety, easier to do safety function since they'll all have similar constraints
50
-
51
- await ctx.message.add_reaction('πŸ‘')
52
- thread = await ctx.message.create_thread(name=f'{ctx.author} Jojo Thread ')
53
 
54
- style = None
55
- style = 'JoJo'
56
-
57
- await thread.send(f'{ctx.author.mention}Generating JoJo image in thread, yare yare daze...')
58
-
59
- if style:
60
- if ctx.message.attachments:
61
- attachment = ctx.message.attachments[0]
62
- im = jojogan.predict(attachment.url, style)
63
- await ctx.message.reply(f'Here is the {style} version of it', file=discord.File(im))
64
- else:
65
- await ctx.message.channel.send("No attachments to be found...Can't animify dat! Try sending me an image πŸ˜‰")
66
  #----------------------------------------------------------------------------------------------------------------------------------------------
67
  # Stage 1
68
  @bot.command()
 
45
 
46
  #----------------------------------------------------------------------------------------------------------------------------------------------
47
  # jojo
48
+ @bot.command()
49
+ async def jojo(ctx):
 
 
 
50
 
51
+ if ctx.message.attachments:
52
+ attachment = ctx.message.attachments[0]
53
+
54
+ await ctx.send("Attachment found!")
55
+ else:
56
+ await ctx.send("No attachment found.")
 
 
 
 
 
 
57
  #----------------------------------------------------------------------------------------------------------------------------------------------
58
  # Stage 1
59
  @bot.command()