@commands.command()
@commands.cooldown(1, 15, commands.BucketType.user)
async def love(self, ctx, user:discord.User=None):
if user == ctx.author :
embed = discord.Embed(title="An Error Occured", description="You maybe need some love, but you can't send love to yourself", color=0x00ffff)
msg = await ctx.send(embed=embed)
time.sleep(5)
await ctx.message.delete()
await msg.delete()
ctx.command.reset_cooldown()
if user == None:
embed = discord.Embed(title="An Error Occured", description="You need to define user!", color=0x00ffff)
msg = await ctx.send(embed=embed)
time.sleep(5)
await ctx.message.delete()
await msg.delete()
ctx.command.reset_cooldown()
else:
embed = discord.Embed(title="You've been sent love!", description=f"{ctx.author} sent you love \nSpread love by doing: ``~love userid/ping``", color=0x00ffff)
api_response = api_instance.gifs_random_get(api_key, tag=tag, rating=rating, fmt=fmt)
embed.set_image(url=api_response.data.image_url)
await user.send(embed=embed)
msg = await ctx.send(f"Love sent to {user}")
time.sleep(5)
await ctx.message.delete()
await msg.delete()
I have this code I can send from amp. It's the love command but I am just deleting it from amp































