mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Get rid of localized guild feature list in serverinfo (#5830)
This commit is contained in:
parent
a3de616e4d
commit
86c6f199b3
@ -352,37 +352,6 @@ class General(commands.Cog):
|
|||||||
"highest": _("4 - Highest"),
|
"highest": _("4 - Highest"),
|
||||||
}
|
}
|
||||||
|
|
||||||
features = {
|
|
||||||
"ANIMATED_ICON": _("Animated Icon"),
|
|
||||||
"ANIMATED_BANNER": _("Animated Banner"),
|
|
||||||
"BANNER": _("Banner"),
|
|
||||||
"COMMERCE": _("Commerce"),
|
|
||||||
"COMMUNITY": _("Community"),
|
|
||||||
"DISCOVERABLE": _("Discoverable"),
|
|
||||||
"FEATURABLE": _("Featurable"),
|
|
||||||
"INVITE_SPLASH": _("Splash Invite"),
|
|
||||||
"MEMBER_VERIFICATION_GATE_ENABLED": _("Membership Screening enabled"),
|
|
||||||
"MONETIZATION_ENABLED": _("Monetization Enabled"),
|
|
||||||
"MORE_STICKERS": _("More Stickers"),
|
|
||||||
"NEWS": _("News"),
|
|
||||||
"PARTNERED": _("Partnered"),
|
|
||||||
"PREVIEW_ENABLED": _("Preview Enabled"),
|
|
||||||
"PRIVATE_THREADS": _("Private Threads"),
|
|
||||||
"ROLE_ICON": _("Role Icon"),
|
|
||||||
"SEVEN_DAY_THREAD_ARCHIVE": _("Seven Day Thread Archive"),
|
|
||||||
"THREE_DAY_THREAD_ARCHIVE": _("Three Day Thread Archive"),
|
|
||||||
"TICKETED_EVENTS_ENABLED": _("Ticketed Events Enabled"),
|
|
||||||
"VERIFIED": _("Verified"),
|
|
||||||
"VANITY_URL": _("Vanity URL"),
|
|
||||||
"VIP_REGIONS": _("VIP Regions"),
|
|
||||||
"WELCOME_SCREEN_ENABLED": _("Welcome Screen Enabled"),
|
|
||||||
}
|
|
||||||
guild_features_list = [
|
|
||||||
f"\N{WHITE HEAVY CHECK MARK} {name}"
|
|
||||||
for feature, name in features.items()
|
|
||||||
if feature in guild.features
|
|
||||||
]
|
|
||||||
|
|
||||||
joined_on = _(
|
joined_on = _(
|
||||||
"{bot_name} joined this server on {bot_join}. That's over {since_join} days ago!"
|
"{bot_name} joined this server on {bot_join}. That's over {since_join} days ago!"
|
||||||
).format(
|
).format(
|
||||||
@ -444,8 +413,36 @@ class General(commands.Cog):
|
|||||||
),
|
),
|
||||||
inline=False,
|
inline=False,
|
||||||
)
|
)
|
||||||
if guild_features_list:
|
|
||||||
data.add_field(name=_("Server features:"), value="\n".join(guild_features_list))
|
excluded_features = {
|
||||||
|
# available to everyone since forum channels private beta
|
||||||
|
"THREE_DAY_THREAD_ARCHIVE",
|
||||||
|
"SEVEN_DAY_THREAD_ARCHIVE",
|
||||||
|
# rolled out to everyone already
|
||||||
|
"NEW_THREAD_PERMISSIONS",
|
||||||
|
"TEXT_IN_VOICE_ENABLED",
|
||||||
|
"THREADS_ENABLED",
|
||||||
|
}
|
||||||
|
custom_feature_names = {
|
||||||
|
"VANITY_URL": "Vanity URL",
|
||||||
|
"VIP_REGIONS": "VIP regions",
|
||||||
|
}
|
||||||
|
features = sorted(guild.features)
|
||||||
|
if "COMMUNITY" in features:
|
||||||
|
features.remove("NEWS")
|
||||||
|
feature_names = [
|
||||||
|
custom_feature_names.get(feature, " ".join(feature.split("_")).capitalize())
|
||||||
|
for feature in features
|
||||||
|
if feature not in excluded_features
|
||||||
|
]
|
||||||
|
if guild.features:
|
||||||
|
data.add_field(
|
||||||
|
name=_("Server features:"),
|
||||||
|
value="\n".join(
|
||||||
|
f"\N{WHITE HEAVY CHECK MARK} {feature}" for feature in feature_names
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
if guild.premium_tier != 0:
|
if guild.premium_tier != 0:
|
||||||
nitro_boost = _(
|
nitro_boost = _(
|
||||||
"Tier {boostlevel} with {nitroboosters} boosts\n"
|
"Tier {boostlevel} with {nitroboosters} boosts\n"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user