Skip to content

Commit 95474f8

Browse files
authored
add system_content support
1 parent 579751a commit 95474f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

discord/message.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1433,11 +1433,14 @@ def system_content(self) -> str:
14331433
regardless of the :attr:`Message.type`.
14341434
14351435
In the case of :attr:`MessageType.default` and :attr:`MessageType.reply`\,
1436-
this just returns the regular :attr:`Message.content`. Otherwise, this
1436+
this just returns the regular :attr:`Message.content`, and forwarded messages
1437+
will display the original message's content from :attr:`Message.snapshots`. Otherwise, this
14371438
returns an English message denoting the contents of the system message.
14381439
"""
14391440

14401441
if self.type is MessageType.default:
1442+
if self.snapshots:
1443+
return self.snapshots[0].message and self.snapshots[0].message.content
14411444
return self.content
14421445

14431446
if self.type is MessageType.recipient_add:

0 commit comments

Comments
 (0)