Add support for stage message types

This commit is contained in:
Rapptz
2023-02-27 09:17:40 -05:00
parent ef4240dcd7
commit bd6bbdab00
3 changed files with 45 additions and 5 deletions

View File

@ -2017,6 +2017,21 @@ class Message(PartialMessage, Hashable):
months = '1 month' if total_months == 1 else f'{total_months} months'
return f'{self.author.name} joined {self.role_subscription.tier_name} and has been a subscriber of {self.guild} for {months}!'
if self.type is MessageType.stage_start:
return f'{self.author.name} started **{self.content}**.'
if self.type is MessageType.stage_end:
return f'{self.author.name} ended **{self.content}**.'
if self.type is MessageType.stage_speaker:
return f'{self.author.name} is now a speaker.'
if self.type is MessageType.stage_raise_hand:
return f'{self.author.name} requested to speak.'
if self.type is MessageType.stage_topic:
return f'{self.author.name} changed Stage topic: **{self.content}**.'
# Fallback for unknown message types
return ''