0

I've been making this pp size machine, which is somewhat like dank memer's one

@client.command()
async def pp(ctx,member : discord.Member):
  size=random.randint(1,10)
  message = "8"
  for x in range (size):
    message= message + "="
    if x == size-1:
      message = message + "D"
  if member == "PROTATO#6826":
    message = "8D"
  ppsize = discord.Embed(color=discord.Colour.orange(), title=f"PP size",description=f"""{member}'s penis 
    {message}        """)
  await ctx.send(embed = ppsize)

But i want to rig the command for a certain user to only show "8D" instead of the random lengths.

But no matter what it is the

if member == "PROTATO#6826":
    message = "8D"

code doesnt run or gets over looked? Can someone help me out with this?

okbyeeee
  • 13
  • 2
  • Welcome to Stack okbye! Do you have the member's id? If you do, you can use [`member.id`](https://discordpy.readthedocs.io/en/stable/api.html?highlight=member%20id#discord.Member.id) and compare it with what you have. – Bagle Mar 21 '22 at 02:40
  • I have no clue what is that, do u mind explaining and how i should imply that code to my own? – okbyeeee Mar 21 '22 at 06:15
  • I will write an answer. If it doesn't help, do comment on it, thanks. – Bagle Mar 21 '22 at 06:36

1 Answers1

1

You can check if the member mentioned has the same id as a specific user. You can either enable developer mode on discord, or you can print the member.id at the very beginning. Do view a code example below.

@client.command()
async def pp(ctx, member: discord.Member):
    print(member.id) # this would print a user's unique id
    message = "Hey!"
    if member.id == 394506589350002688: # replace this id with what was printed at the start
        message = "Hello!"
    await ctx.send(message)

Image of code above

Similar Questions:

Bagle
  • 2,326
  • 3
  • 12
  • 36