I can't figure out how to send a message without using ctx in the discord_components module, which extends discord.py for using buttons and other components. The fact is that in some guides uses ctx, but this does not suit me. I want to send a message according to the following principle: message.channel.send(embed=embed, components = components), but in this module (discord_components) I can't figure out why this doesn't work for me, and why I encounter the error "TypeError: send() got an unexpected keyword argument 'components'". I also tried using "send_component_msg" instead of "send", but I got the error " Attribute error: the "TextChannel" object does not have the "send_component_msg " attribute".
My code:
import discord
from discord_components import DiscordComponents, Button, Select, SelectOption
async def info(msg):
embed = my_embed
...
components = [Button(label = ""), Button(label = ""), Button(label = ""), Button(label = "")]
try:
await message.edit(embed = embed, components = components)
except Exception:
message = await msg.channel.send_component_msg(embed=embed, components = components)