mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 00:07:51 +00:00
Change Message.system_content to always return str
This commit is contained in:
parent
903e2e64e9
commit
7e66e11640
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user