-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Given:
from typing import Optional
def system_content(self) -> Optional[str]:
if self.type is MessageType.role_subscription_purchase:
if not (data := self.role_subscription_data):
return
guild_name = f"**{self.guild.name}**" if self.guild else None
if data.total_months_subscribed > 0:
action = "renewed" if data.is_renewal else "joined"
return (
f"{self.author.name} {action} **{data.tier_name}** and has been a subscriber "
f"of {guild_name} for {data.total_months_subscribed} "
f"{'month' if data.total_months_subscribed == 1 else 'months'}!"
)
elif data.is_renewal:
return f"{self.author.name} renewed **{data.tier_name}** in their {guild_name} membership!"
else:
return f"{self.author.name} joined **{data.tier_name}** as a subscriber of {guild_name}!"
return NoneRunning ruff . --select RET505 --select RET502 raises RET505, but not RET502.
Reported on Discord.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working