Guest User

Untitled

a guest
Feb 24th, 2022
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.64 KB | None | 0 0
  1. @bot.command()
  2. async def ship(ctx, person1: discord.User, person2: discord.User):
  3.     if (
  4.         768393728163053619 not in (person1.id, person2.id)
  5.         and 536479129025904651 not in (person1.id, person2.id)
  6.         and person1.id != person2.id
  7.     ):
  8.         ship_percent = random.randint(0, 101)
  9.         if ship_percent == 0:
  10.             ship_msg = "Yikes..."
  11.         elif ship_percent > 0 and ship_percent <= 25:
  12.             ship_msg = "Doesn't look like this will work out :tired_face:"
  13.         elif ship_percent > 25 and ship_percent <= 50:
  14.             ship_msg = "Not great odds sadly :pensive:"
  15.         elif ship_percent > 50 and ship_percent <= 75:
  16.             ship_msg = "Not too shabby :eyes:"
  17.         elif ship_percent > 75 and ship_percent <= 99:
  18.             ship_msg = "Start going out already..."
  19.         elif ship_percent == 100:
  20.             ship_msg = "WELL DAMN!"
  21.         elif ship_percent == 101:
  22.             ship_msg = "OMG! :heart:"
  23.  
  24.         embed = discord.Embed(title="Love-O-Meter", description=f"{person1.mention} x {person2.mention}")
  25.         embed.add_field(name=f"{ship_percent}%", value=ship_msg)
  26.  
  27.         if ship_percent == 0:
  28.             embed.set_image(url="gif goes here")
  29.         elif ship_percent > 0 and ship_percent <= 25:
  30.             embed.set_image(url="gif goes here")
  31.         elif ship_percent > 25 and ship_percent <= 50:
  32.             embed.set_image(url="gif goes here")
  33.         elif ship_percent > 50 and ship_percent <= 75:
  34.             embed.set_image(url="gif goes here")
  35.         elif ship_percent > 75 and ship_percent <= 99:
  36.             embed.set_image(url="gif goes here")
  37.         elif ship_percent == 100:
  38.             embed.set_image(url="gif goes here")
  39.         elif ship_percent == 101:
  40.             embed.set_image(url="gif goes here")
  41.  
  42.         await ctx.channel.send(embed=embed)
  43.  
  44.     elif person1.id == person2.id:
  45.         embed_sad = discord.Embed(description="Well this is sad...")
  46.         await ctx.channel.send(embed_sad=embed_sad)
  47.     elif 768393728163053619 in (person1.id, person2.id) and 536479129025904651 in (person1.id, person2.id):
  48.         embed_fake = discord.Embed(title="Love-O-Meter", description=f"{person1.mention} x {person2.mention}")
  49.         embed_fake.add_field(name="101%", value="Made for each other :heart_eyes:")
  50.         embed_fake.set_image(url="https://i.gifer.com/fOG.gif")
  51.  
  52.         await ctx.channel.send(embed_fake=embed_fake)
  53.  
  54.  
  55. @ship.error
  56. async def on_ship_error(ctx, error):
  57.     if isinstance(error, commands.MissingRequiredArgument):
  58.         embed = discord.Embed(description="Syntax is `'ship @user1 @user2`")
  59.         await ctx.channel.send(embed=embed)
Advertisement
Add Comment
Please, Sign In to add comment