categorize forum channel messages are thread starter
This commit is contained in:
parent
8fe70dc9e0
commit
4b24b29c03
2 changed files with 9 additions and 0 deletions
|
|
@ -543,7 +543,13 @@ class DiscordExporter:
|
|||
content = msg.content or ""
|
||||
msg_type = int(msg.type.value) if hasattr(msg.type, "value") else 0
|
||||
|
||||
# Force MessageType.thread_starter_message (21) for forum post starter messages
|
||||
if isinstance(msg.channel, discord.Thread) and isinstance(msg.channel.parent, discord.ForumChannel):
|
||||
if msg.id == msg.channel.id:
|
||||
msg_type = 21
|
||||
|
||||
is_forwarded = getattr(msg.flags, 'forwarded', False)
|
||||
|
||||
if is_forwarded and hasattr(msg, 'message_snapshots') and msg.message_snapshots:
|
||||
msg_type = 100 # Custom Forward type
|
||||
snapshot = msg.message_snapshots[0]
|
||||
|
|
|
|||
|
|
@ -184,6 +184,9 @@ class OperationPane(Container):
|
|||
self.run_validate()
|
||||
|
||||
def _base_dir(self) -> str:
|
||||
# If the config file is in the root, our base directory is current (.)
|
||||
if str(self.config_path) == "reaper_config.yaml":
|
||||
return "."
|
||||
return f"ReaperFiles-{self.cfg_name}"
|
||||
|
||||
def _rebuild_engine(self):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue