#Passing msg.components to new msg component

1 messages · Page 1 of 1 (latest)

lucid violet
#
components = msg.components
logging.info(components)
await msg.delete()
await Guilds.filter(id=inter.guild.id).update(ticket_channel=ticket_channel.id)
msg: disnake.Message = await channel.send(embed=embed, components=components)

msg.components says its a List of actionrow yet when i pass to .send it errors out?

disnake.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: `components` must be a `WrappedComponent` or `ActionRow`, a sequence/list of `WrappedComponent`s or `ActionRow`s, or a nested sequence/list of `WrappedComponent`s
smoky shore
#

disnake.ActionRow vs disnake.ui.ActionRow

lucid violet
#

gg

smoky shore
#

no fucking reason for it to be that way but it do be that way

lucid violet
#

so how do i convert just recreate?

smoky shore
#

-d disnake.ActionRow.rows_from_message

silk yewBOT
#

classmethod rows_from_message(message, *, strict=True)```
Create a list of up to 5 action rows from the components on an existing message.

This will abide by existing component format on the message, including component ordering and rows. Components will be transformed to UI kit components, such that they can be easily modified and re-sent as action rows.

New in version 2.6.
lucid violet
#

ah