mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-05 17:41:53 +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')
|
@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
|
r""":class:`str`: A property that returns the content that is rendered
|
||||||
regardless of the :attr:`Message.type`.
|
regardless of the :attr:`Message.type`.
|
||||||
|
|
||||||
@ -1931,6 +1931,9 @@ class Message(PartialMessage, Hashable):
|
|||||||
if self.type is MessageType.guild_invite_reminder:
|
if self.type is MessageType.guild_invite_reminder:
|
||||||
return 'Wondering who to invite?\nStart by inviting anyone who can help you build the server!'
|
return 'Wondering who to invite?\nStart by inviting anyone who can help you build the server!'
|
||||||
|
|
||||||
|
# Fallback for unknown message types
|
||||||
|
return ''
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
async def edit(
|
async def edit(
|
||||||
self,
|
self,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user