I have been searching for the past couple of hours for a way to send a direct message using their discord tag (e.g mj#0001) i have looked everywhere and no solution works for me
i tried client.send_message()
but it says
unresolved attribute reference "send_message" for class "Bot"
here's my code:
@client.command()
async def DM(ctx, user_to_dm): # user_to_dm is the discord tag like mj#0081
await client.send_message(user_to_dm, "insert message here")
i've also tried to create a private channel and add the member i want but i've had no luck. semi-beginner in python , discord library has been very hard for me to use. any help would be appreciated.