Answer the question
In order to leave comments, you need to log in
How to get user by id discord.py?
I get the user id from a folder and convert it to an int.
elif n == ":":
mesg = mesg.join(wordo)
wordo.clear()
wordo.append(mesg)
print(wordo)
member = bot.get_user(mesg)
break
else:
await channel.send(f"Item ``{item}`` not found. ``>list`, to get list of items")
else:
await channel.send(f"u cant do it in this channel")
if findor == 1:
await author.send(f"U buying ``{item}`` from ``{member}``")
await member.get_user(mesg).send(f"``{author}`` want buy your ``{item}``")
elif findor == 0:
await channel.send(f"Item ``{item}`` not in sell.")
f AttributeError: 'NoneType' object has no attribute 'get_user'
Answer the question
In order to leave comments, you need to log in
sorry here is the reason in bot.get_user(mesg) and await member.get_user(mesg).send(f"``{author}`` want buy your ``{item}``") i just forgot to change
mesg = mesg.join(wordo)
wordo.clear()
wordo.append(mesg)
print(wordo)
member = bot.get_user(mesg)
break
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question