mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Fix Message.system_content for role_subscription_purchase renewal type
This commit is contained in:
parent
b3141db6e9
commit
48cf500e09
@ -2516,10 +2516,10 @@ class Message(PartialMessage, Hashable):
|
|||||||
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!'
|
||||||
|
|
||||||
if self.type is MessageType.role_subscription_purchase and self.role_subscription is not None:
|
if self.type is MessageType.role_subscription_purchase and self.role_subscription is not None:
|
||||||
# TODO: figure out how the message looks like for is_renewal: true
|
|
||||||
total_months = self.role_subscription.total_months_subscribed
|
total_months = self.role_subscription.total_months_subscribed
|
||||||
months = '1 month' if total_months == 1 else f'{total_months} months'
|
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}!'
|
action = 'renewed' if self.role_subscription.is_renewal else 'joined'
|
||||||
|
return f'{self.author.name} {action} **{self.role_subscription.tier_name}** and has been a subscriber of {self.guild} for {months}!'
|
||||||
|
|
||||||
if self.type is MessageType.stage_start:
|
if self.type is MessageType.stage_start:
|
||||||
return f'{self.author.name} started **{self.content}**.'
|
return f'{self.author.name} started **{self.content}**.'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user