Skip to content
Advertisement

Tag: discord

Discord.py how do I send a DM to anyone I want through a command

Someone asked me to make a bot for him that sends a DM to anyone he specifies through a command, like *send_dm @Jess#6461 hello. I’ve searched alot and I came across this code: but then I got the error: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: ‘Bot’ object has no attribute ‘send_message’ I want to type for example : *send_dm @Jess#6461

Advertisement