Change Message.system_content to always return str

This commit is contained in:
Rapptz 2022-06-14 20:38:39 -04:00
parent 903e2e64e9
commit 7e66e11640

View File

@ -1817,7 +1817,7 @@ class Message(PartialMessage, Hashable):
)
@utils.cached_slot_property('_cs_system_content')
def system_content(self) -> Optional[str]:
def system_content(self) -> str:
r""":class:`str`: A property that returns the content that is rendered
regardless of the :attr:`Message.type`.
@ -1931,6 +1931,9 @@ class Message(PartialMessage, Hashable):
if self.type is MessageType.guild_invite_reminder:
return 'Wondering who to invite?\nStart by inviting anyone who can help you build the server!'
# Fallback for unknown message types
return ''
@overload
async def edit(
self,