0

I'm making a Discord Python bot and I want to add a feature: When someone uses !feedback command and then types his feedback about the bot, the user's message will be automatically copied and sent to my DMs by the bot. Any ideas?

Aaron
  • 227
  • 5
  • 10
  • 1
    Does this answer your question? [Python - DM a User Discord Bot](https://stackoverflow.com/questions/52343245/python-dm-a-user-discord-bot) – ilusha Oct 15 '21 at 10:29

1 Answers1

0
async def send_dm(ctx, member: discord.Member, *, content):
    channel = await member.create_dm()
    await channel.send(content)

You can try to use that and it should work!

Benni
  • 74
  • 8
  • @ilusha's comment solves the question, there is no need for an answer if the question can be solved in the comments. Also it will be helpful if you mention how your solution works as well since it can be helpful for future viewers of this question. – typedecker Oct 15 '21 at 13:16
  • @MatrixProgrammer Actually no. @ilusha's comment does not solve the question, as the solution, there is about sending a message to the dm of the user, who is mentioned. Personally, I'm trying to make this: using `_feedback` and typing actual feedback, the bot will copy the entire `_feedback` message and send it to **me**. There's no need to mention someone, it will be automatically sent to me... – Aaron Oct 28 '21 at 19:41