Reputation: 75
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?
Upvotes: 2
Views: 307
Reputation: 44
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
Upvotes: 1
Reputation: 1
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")
Upvotes: 0