I'm trying to figure out how to send a pm from a discord.py rewrite bot. I can't do ctx.author.send("context") because it messaging someone other than the author of the message. here's the code that I have so far when I'm searching for a user it always comes with the value of NONE
@bot.command()
async def spam(ctx, author, message, amount):
print(author)
print(ctx.author)
victim = bot.get_user(author)
print(victim)
if not (victim == None):
for i in range(int(amount)):
await victim.send(message)
else:
print("NOPE")
It has the out put of
GIMMY READY......
Denard#0759
Denard#0759
None
NOPE