diff --git a/CHANGELOG.md b/CHANGELOG.md index fdfdc6d896..350c1dad13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,8 @@ These changes are available on the `master` branch, but have not yet been releas ### Fixed +- Fixed `Message.system_content()` raised an error if the message is an + application_command ([#2825](https://github.com/Pycord-Development/pycord/pull/2825)) - Fixed `Enum` options not setting the correct type when only one choice is available. ([#2577](https://github.com/Pycord-Development/pycord/pull/2577)) - Fixed `codec` option for `FFmpegOpusAudio` class to make it in line with diff --git a/discord/message.py b/discord/message.py index 3523d84f83..9b09b310ab 100644 --- a/discord/message.py +++ b/discord/message.py @@ -1593,6 +1593,12 @@ def system_content(self) -> str: " build the server!" ) + if self.type is MessageType.application_command: + return ( + f"{self.author.name} sent an application command to {self.channel.name} channel in" + f" {self.guild.name if self.guild is not None else 'NoneGuild'} guild." + ) + async def delete( self, *, delay: float | None = None, reason: str | None = None ) -> None: