hi again, i made a bulk message delete event and what im trying to make it do is whenever messages are deleted in bulk, an embed gets sent to the log embed saying how many messages got deleted, which works fine. but ive been trying to make it add a .txt file of the messages like in the photo with the embed but i keep getting this error
error:
Traceback (most recent call last):
File "/Users/st1xkz/bobert/bobert/plugins/listeners/logging.py", line 82, in on_bulk_deleted_message
attachment = hikari.File(file_data.read(), filename="bulk_delete.txt")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/st1xkz/bobert/venv/lib/python3.12/site-packages/hikari/files.py", line 896, in __init__
self.path = ensure_path(path)
^^^^^^^^^^^^^^^^^
File "/Users/st1xkz/bobert/venv/lib/python3.12/site-packages/hikari/files.py", line 149, in ensure_path
return pathlib.Path(pathish)
^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py", line 1162, in __init__
super().__init__(*args)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py", line 373, in __init__
raise TypeError(
TypeError: argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'bytes'
here is the code: https://pastes.dev/cd1Dt1tjZI