mahtoid / DiscordChatExporterPy

A simple Discord chat exporter for Python Discord bots.
GNU General Public License v3.0
209 stars 75 forks source link

Error exporting chat #86

Closed cyklon73 closed 1 year ago

cyklon73 commented 1 year ago

DiscordChatExporterPy Version

2.5.3

Discord Version

https://discord4py.dev

Bug Description

when i want to export a chat i get this error. (the chat contains bot messages with buttons) code:


        transcript = await chat_exporter.export(
            channel=interaction.channel,
            bot=self.bot
        )

        if transcript is None:
            return None

        file = discord.File(
            io.BytesIO(transcript.encode()),
            filename=f'test.html',
        )

Bug Traceback

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/chat_exporter/construct/transcript.py", line 166, in export return await super().build_transcript() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chat_exporter/construct/transcript.py", line 55, in build_transcript message_html, meta_data = await gather_messages( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chat_exporter/construct/message.py", line 389, in gather_messages
content_html, meta_data = await MessageConstruct( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chat_exporter/construct/message.py", line 83, in construct_message
await self.build_message() File "/usr/local/lib/python3.11/site-packages/chat_exporter/construct/message.py", line 91, in build_message
await self.build_assets() File "/usr/local/lib/python3.11/site-packages/chat_exporter/construct/message.py", line 232, in build_assets
self.components += await Component(c, self.guild).flow() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chat_exporter/construct/assets/component.py", line 99, in flow
for c in self.component.children: ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'ActionRow' object has no attribute 'children' Please send a screenshot of the above error to https://www.github.com/mahtoid/DiscordChatExporterPy

Additional Information

Screenshot 2023-06-06 003441

mahtoid commented 1 year ago

This was solved within our Discord discussion. It was noted that Discord4py is not supported within chat-exporter, nor will it be any time soon.