Add forum post rename system message

This commit is contained in:
Lilly Rose Berner
2022-07-11 12:05:07 +02:00
committed by GitHub
parent eea70b53cd
commit e0341c9ef2

View File

@ -1850,7 +1850,10 @@ class Message(PartialMessage, Hashable):
return f'{self.author.name} removed {self.mentions[0].name} from the thread.'
if self.type is MessageType.channel_name_change:
return f'{self.author.name} changed the channel name: **{self.content}**'
if getattr(self.channel, 'parent', self.channel).type is ChannelType.forum:
return f'{self.author.name} changed the post title: **{self.content}**'
else:
return f'{self.author.name} changed the channel name: **{self.content}**'
if self.type is MessageType.channel_icon_change:
return f'{self.author.name} changed the channel icon.'