discord.py-message-components 'message.channel.send()' broken in dms

Viewed 177

discord.py-message-components package

await message.channel.send(mem)
AttributeError: 'Object' object has no attribute 'send'

discord.py package

await message.channel.send(mem)
sends successfully

Note, sending commands and receiving output using discord.py-message-components works fine in server channels but breaks in dms.

Does anyone have a reason as to why this is and/or a solution?

2 Answers

A little bit late but... yeah...

This is fixed for a longer time now. Just update to the newest developer version using

# Linux/macOS
python3 -m pip install -U git+https://github.com/mccoderpy/discord.py-message-components.git@developer

# Windows
py -m pip install -U git+https://github.com/mccoderpy/discord.py-message-components.git@developer

Well basically the class Message you can use it on events like

@bot.event
async def on_message(message:discord.Message):
   await message.chnnael.send("Hello World")
Related