utility: silk icons for guild features

This commit is contained in:
Cynthia Foxwell 2024-06-12 15:27:19 -06:00
parent 9f80196d25
commit f48b7e1d2b

View file

@ -190,309 +190,416 @@ const APPLICATION_TYPES = [
"Creator Monetization", "Creator Monetization",
]; ];
const SILK_ICONS = Object.fromEntries(
Object.entries({
joystick: "1250544500246577172",
film: "1250544523730223277",
shield: "1250543253472673875",
vcard: "1250544496765308948",
photo: "1250543277267222639",
world_add: "1250544495435452547",
ruby: "1250544494739325001",
emoticon_smile: "1250543500471046288",
bug: "1250544574104080507",
comments_star: "1250544493841616988",
comments_delete: "1250544492709412946",
flag_blue: "1250544491471831131",
flag_red: "1250544490507141312",
controller: "1250544489156710541",
cog_delete: "1250544595666997288",
cog: "1250543252747321468",
basket: "1250544573088923722",
group: "1250543273726967900",
check_checked_green: "1250544572203929815",
world: "1250543499489706195",
world_delete: "1250544571180515408",
transmit_blue: "1250544569448136857",
comments: "1250543256052301924",
status_away: "1250544568772853801",
page_link: "1250544567665561631",
book_open_mark: "1250544632064901240",
house: "1250543270342426644",
lock: "1250543498470359121",
sitemap: "1250544630907535361",
eye: "1250544630043381872",
link: "1250543266806628412",
time: "1250544629053522030",
delete: "1250543248909406248",
money: "1250544627665211404",
money_delete: "1250544627178803313",
emoticon_smile_add: "1250544626054594560",
image_add: "1250544625068806215",
newspaper: "1250543497010872485",
bell: "1250544670178803722",
application_view_tile: "1250544666080837703",
star: "1250543254869381170",
compress: "1250544665091113080",
bell_delete: "1250544686121095289",
stop: "1250544664000467056",
creditcards: "1250544663014936798",
tag_blue: "1250543263656574996",
calendar: "1250543496255897660",
book_go: "1250544662037528717",
palette: "1250544661035225189",
sound: "1250543260196147323",
key: "1250543495286882375",
book_tabs: "1250544659940380672",
book_tabs_delete: "1250555962364919808",
wand: "1250544659038601266",
tick: "1250543251375653007",
microphone: "1250543257398542436",
user_add: "1250544566503739412",
}).map(([key, val]) => [key, `<:_:${val}>`])
);
// https://discord-userdoccers.vercel.app/resources/guild#guild-features // https://discord-userdoccers.vercel.app/resources/guild#guild-features
const GUILD_FEATURES = { const GUILD_FEATURES = {
ACTIVITIES_ALPHA: {icon: "\u{1f680}", name: "Activities (Alpha)"}, ACTIVITIES_ALPHA: {icon: SILK_ICONS.joystick, name: "Activities (Alpha)"},
ACTIVITIES_EMPLOYEE: {icon: "\u{1f680}", name: "Activities (Staff)"}, ACTIVITIES_EMPLOYEE: {icon: SILK_ICONS.joystick, name: "Activities (Staff)"},
ACTIVITIES_INTERNAL_DEV: { ACTIVITIES_INTERNAL_DEV: {
icon: "\u{1f680}", icon: SILK_ICONS.joystick,
name: "Activities (Internal Dev)", name: "Activities (Internal Dev)",
}, },
ANIMATED_BANNER: {icon: "\u{1f39e}"}, ANIMATED_BANNER: {icon: SILK_ICONS.film},
ANIMATED_ICON: {icon: "\u{1f39e}"}, ANIMATED_ICON: {icon: SILK_ICONS.film},
APPLICATION_COMMAND_PERMISSIONS_V2: {icon: "\u2699\ufe0f", deprecated: true}, APPLICATION_COMMAND_PERMISSIONS_V2: {
AUTO_MODERATION: {icon: "\u{1f6e1}", name: "AutoMod"}, icon: SILK_ICONS.cog,
name: "Command Permissions V2",
deprecated: true,
},
AUTO_MODERATION: {icon: SILK_ICONS.shield, name: "AutoMod"},
AUTOMOD_TRIGGER_KEYWORD_FILTER: { AUTOMOD_TRIGGER_KEYWORD_FILTER: {
icon: "\u{1f6e1}", icon: SILK_ICONS.shield,
name: "AutoMod: Keywords", name: "AutoMod: Keywords",
deprecated: true, deprecated: true,
}, },
AUTOMOD_TRIGGER_ML_SPAM_FILTER: { AUTOMOD_TRIGGER_ML_SPAM_FILTER: {
icon: "\u{1f6e1}", icon: SILK_ICONS.shield,
name: "AutoMod: Spam", name: "AutoMod: Spam",
deprecated: true, deprecated: true,
}, },
AUTOMOD_TRIGGER_SPAM_LINK_FILTER: { AUTOMOD_TRIGGER_SPAM_LINK_FILTER: {
icon: "\u{1f6e1}", icon: SILK_ICONS.shield,
name: "AutoMod: Spam Links", name: "AutoMod: Spam Links",
deprecated: true, deprecated: true,
}, },
AUTOMOD_TRIGGER_USER_PROFILE: { AUTOMOD_TRIGGER_USER_PROFILE: {
icon: "\u{1faaa}", icon: SILK_ICONS.vcard,
name: "AutoMod: User Profiles", name: "AutoMod: User Profiles",
}, },
BANNER: {icon: "\u{1f5bc}"}, BANNER: {icon: SILK_ICONS.photo},
BFG: {icon: "\u{1f388}", name: "BFG"}, BFG: {icon: SILK_ICONS.world_add, name: "BFG"},
BOOSTING_TIERS_EXPERIMENT_MEDIUM_GUILD: { BOOSTING_TIERS_EXPERIMENT_MEDIUM_GUILD: {
icon: "\u{1f48e}", icon: SILK_ICONS.ruby,
name: "Boosting: Medium Guild", name: "Boosting: Medium Guild",
deprecated: true, deprecated: true,
}, },
BOOSTING_TIERS_EXPERIMENT_SMALL_GUILD: { BOOSTING_TIERS_EXPERIMENT_SMALL_GUILD: {
icon: "\u{1f48e}", icon: SILK_ICONS.ruby,
name: "Boosting: Small Guild", name: "Boosting: Small Guild",
deprecated: true, deprecated: true,
}, },
BOT_DEVELOPER_EARLY_ACCESS: {icon: "\u{1f9ea}"}, BOT_DEVELOPER_EARLY_ACCESS: {icon: SILK_ICONS.cog},
BURST_REACTIONS: {icon: "\u2728", name: "Super Reactions"}, BURST_REACTIONS: {icon: SILK_ICONS.wand, name: "Super Reactions"},
CHANNEL_BANNER: {icon: "\u{1f5bc}", deprecated: true}, CHANNEL_BANNER: {icon: SILK_ICONS.photo, deprecated: true},
CHANNEL_ICON_EMOJIS_GENERATED: { CHANNEL_ICON_EMOJIS_GENERATED: {
icon: "\u{1f603}", icon: SILK_ICONS.emoticon_smile,
name: "Channel Icon Emojis", name: "Channel Icon Emojis",
}, },
CHANNEL_HIGHLIGHTS: {icon: "\u{1f5c3}"}, CHANNEL_HIGHLIGHTS: {icon: SILK_ICONS.comments_star},
CHANNEL_HIGHLIGHTS_DISABLED: {icon: "\u{1f6ab}"}, CHANNEL_HIGHLIGHTS_DISABLED: {icon: SILK_ICONS.comments_delete},
CLAN: {icon: "\u2694\ufe0f"}, CLAN: {icon: SILK_ICONS.flag_blue},
CLAN_DISCOVERY_DISABLED: {icon: "\u2694\ufe0f"}, CLAN_DISCOVERY_DISABLED: {icon: SILK_ICONS.flag_red},
CLAN_PILOT_GENSHIN: { CLAN_PILOT_GENSHIN: {
icon: "\u2694\ufe0f", icon: SILK_ICONS.flag_blue,
name: "Clan Pilot: Genshin Impact", name: "Clan Pilot: Genshin Impact",
}, },
CLAN_PILOT_VALORANT: { CLAN_PILOT_VALORANT: {
icon: "\u2694\ufe0f", icon: SILK_ICONS.flag_blue,
name: "Clan Pilot: Valorant", name: "Clan Pilot: Valorant",
}, },
CLAN_PREPILOT_GENSHIN: { CLAN_PREPILOT_GENSHIN: {
icon: "\u2694\ufe0f", icon: SILK_ICONS.flag_blue,
name: "Clan Pre-Pilot: Genshin Impact", name: "Clan Pre-Pilot: Genshin Impact",
}, },
CLAN_PREPILOT_VALORANT: { CLAN_PREPILOT_VALORANT: {
icon: "\u2694\ufe0f", icon: SILK_ICONS.flag_blue,
name: "Clan Pre-Pilot: Valorant", name: "Clan Pre-Pilot: Valorant",
}, },
CLYDE_DISABLED: {icon: "\u{1f6ab}", deprecated: true}, CLYDE_DISABLED: {icon: SILK_ICONS.cog_delete, deprecated: true},
CLYDE_ENABLED: {icon: "\u{1f916}", deprecated: true}, CLYDE_ENABLED: {icon: SILK_ICONS.cog, deprecated: true},
CLYDE_EXPERIMENT_ENABLED: {icon: "\u{1f9ea}", deprecated: true}, CLYDE_EXPERIMENT_ENABLED: {icon: SILK_ICONS.bug, deprecated: true},
COMMERCE: {icon: "\u{1f6cd}"}, COMMERCE: {icon: SILK_ICONS.basket},
COMMUNITY: {icon: "\u{1f3d8}"}, COMMUNITY: {icon: SILK_ICONS.group},
COMMUNITY_CANARY: {icon: "\u{1f9ea}", name: "Community (Canary)"}, COMMUNITY_CANARY: {icon: SILK_ICONS.bug, name: "Community (Canary)"},
COMMUNITY_EXP_LARGE_GATED: { COMMUNITY_EXP_LARGE_GATED: {
icon: "\u{1f3d8}", icon: SILK_ICONS.group,
name: "Community: Large - Gated", name: "Community: Large - Gated",
}, },
COMMUNITY_EXP_LARGE_UNGATED: { COMMUNITY_EXP_LARGE_UNGATED: {
icon: "\u{1f3d8}", icon: SILK_ICONS.group,
name: "Community: Large - Ungated", name: "Community: Large - Ungated",
}, },
COMMUNITY_EXP_MEDIUM: {icon: "\u{1f3d8}", name: "Community: Medium"}, COMMUNITY_EXP_MEDIUM: {icon: SILK_ICONS.group, name: "Community: Medium"},
CREATOR_ACCEPTED_NEW_TERMS: {icon: "\u2611\ufe0f"}, CREATOR_ACCEPTED_NEW_TERMS: {icon: SILK_ICONS.check_checked_green},
CREATOR_MONETIZABLE: {icon: "\u{1f4b0}", name: "Monetization"}, CREATOR_MONETIZABLE: {icon: SILK_ICONS.money, name: "Monetization"},
CREATOR_MONETIZABLE_DISABLED: { CREATOR_MONETIZABLE_DISABLED: {
icon: "\u{1f6ab}", icon: SILK_ICONS.money_delete,
name: "Monetization Disabled", name: "Monetization Disabled",
}, },
CREATOR_MONETIZABLE_PENDING_NEW_OWNER_ONBOARDING: { CREATOR_MONETIZABLE_PENDING_NEW_OWNER_ONBOARDING: {
icon: "\u{1f4b1}", icon: SILK_ICONS.money,
name: "Monetization: Pending Onboarding", name: "Monetization: Pending Onboarding",
}, },
CREATOR_MONETIZABLE_PROVISIONAL: { CREATOR_MONETIZABLE_PROVISIONAL: {
icon: "\u{1f4b0}", icon: SILK_ICONS.money,
name: "Monetization (Provisional)", name: "Monetization (Provisional)",
}, },
CREATOR_MONETIZABLE_RESTRICTED: { CREATOR_MONETIZABLE_RESTRICTED: {
icon: "\u26d4", icon: SILK_ICONS.money_delete,
name: "Monetization Restricted", name: "Monetization Restricted",
}, },
CREATOR_MONETIZABLE_WHITEGLOVE: { CREATOR_MONETIZABLE_WHITEGLOVE: {
icon: "\u{1f9ea}", icon: SILK_ICONS.bug,
name: "Monetization White Glove", name: "Monetization White Glove",
}, },
CREATOR_MONETIZATION_APPLICATION_ALLOWLIST: { CREATOR_MONETIZATION_APPLICATION_ALLOWLIST: {
icon: "\u{1f4dc}", icon: SILK_ICONS.money,
name: "Monetization Allow List", name: "Monetization Allow List",
}, },
CREATOR_STORE_PAGE: {icon: "\u{1f6d2}"}, CREATOR_STORE_PAGE: {icon: SILK_ICONS.basket},
DEVELOPER_SUPPORT_SERVER: {icon: "\u2754"}, DEVELOPER_SUPPORT_SERVER: {icon: SILK_ICONS.cog},
DISCOVERABLE: {icon: "\u{1f9ed}"}, DISCOVERABLE: {icon: SILK_ICONS.world},
DISCOVERABLE_DISABLED: {icon: "\u{1f6ab}"}, DISCOVERABLE_DISABLED: {icon: SILK_ICONS.world_delete},
ENABLED_DISCOVERABLE_BEFORE: {icon: "\u{1f9ed}"}, ENABLED_DISCOVERABLE_BEFORE: {icon: SILK_ICONS.world},
EXPOSED_TO_ACTIVITIES_WTP_EXPERIMENT: { EXPOSED_TO_ACTIVITIES_WTP_EXPERIMENT: {
icon: "\u{1f9ea}", icon: SILK_ICONS.bug,
name: "Activities: WTP Experiment", name: "Activities: WTP Experiment",
}, },
EXPOSED_TO_BOOSTING_TIERS_EXPERIMENT: { EXPOSED_TO_BOOSTING_TIERS_EXPERIMENT: {
icon: "\u{1f9ea}", icon: SILK_ICONS.bug,
name: "Boosting: Tiers Experiment", name: "Boosting: Tiers Experiment",
deprecated: true, deprecated: true,
}, },
FEATURABLE: {icon: "\u{1f9ed}", deprecated: true}, FEATURABLE: {icon: SILK_ICONS.world, deprecated: true},
FORCE_RELAY: {icon: "\u{1f4fb}", deprecated: true}, FORCE_RELAY: {icon: SILK_ICONS.transmit_blue, deprecated: true},
GENSHIN_L30: {icon: "\u{1f3ae}", name: "Clans: Genshin Impact L30"}, GENSHIN_L30: {icon: SILK_ICONS.controller, name: "Clans: Genshin Impact L30"},
GUESTS_ENABLED: {icon: "\u{1f465}"}, GUESTS_ENABLED: {icon: SILK_ICONS.status_away},
GUILD_AUTOMOD_DEFAULT_LIST: {icon: "\u{1f6e1}", deprecated: true}, GUILD_AUTOMOD_DEFAULT_LIST: {
icon: SILK_ICONS.shield,
name: "AutoMod: Default List",
deprecated: true,
},
GUILD_COMMUNICATION_DISABLED_GUILDS: { GUILD_COMMUNICATION_DISABLED_GUILDS: {
icon: "\u{1f6d1}", icon: SILK_ICONS.time,
name: "Member Timeouts", name: "Member Timeouts",
deprecated: true, deprecated: true,
}, },
GUILD_HOME_DEPRECATION_OVERRIDE: { GUILD_HOME_DEPRECATION_OVERRIDE: {
icon: "\u{1f3da}", icon: SILK_ICONS.house,
name: "Home Tab Deprecation Hidden", name: "Home Tab Deprecation Hidden",
}, },
GUILD_HOME_OVERRIDE: {icon: "\u{1f3e0}", name: "Home Tab (Override)"}, GUILD_HOME_OVERRIDE: {icon: SILK_ICONS.house, name: "Home Tab (Override)"},
GUILD_HOME_TEST: {icon: "\u{1f9ea}", name: "Home Tab (Testing)"}, GUILD_HOME_TEST: {icon: SILK_ICONS.bug, name: "Home Tab (Testing)"},
GUILD_MEMBER_VERIFICATION_EXPERIMENT: {icon: "\u{1f9ea}"}, GUILD_MEMBER_VERIFICATION_EXPERIMENT: {icon: SILK_ICONS.bug},
GUILD_ONBOARDING: {icon: "\u{1f5f3}", name: "Onboarding"}, GUILD_ONBOARDING: {
icon: SILK_ICONS.application_view_tile,
name: "Onboarding",
},
GUILD_ONBOARDING_ADMIN_ONLY: { GUILD_ONBOARDING_ADMIN_ONLY: {
icon: "\u{1f5f3}", icon: SILK_ICONS.application_view_tile,
name: "Onboarding: Admin Only", name: "Onboarding: Admin Only",
deprecated: true, deprecated: true,
}, },
GUILD_ONBOARDING_EVER_ENABLED: { GUILD_ONBOARDING_EVER_ENABLED: {
icon: "\u{1f5f3}", icon: SILK_ICONS.application_view_tile,
name: "Onboarding: Ever Enabled", name: "Onboarding: Ever Enabled",
}, },
GUILD_ONBOARDING_HAS_PROMPTS: { GUILD_ONBOARDING_HAS_PROMPTS: {
icon: "\u{1f5f3}", icon: SILK_ICONS.application_view_tile,
name: "Onboarding: Has Prompts", name: "Onboarding: Has Prompts",
}, },
GUILD_PRODUCTS: {icon: "\u{1f6cd}", name: "Products"}, GUILD_PRODUCTS: {icon: SILK_ICONS.basket, name: "Products"},
GUILD_PRODUCTS_ALLOW_ARCHIVED_FILE: { GUILD_PRODUCTS_ALLOW_ARCHIVED_FILE: {
icon: "\u{1f5dc}", icon: SILK_ICONS.compress,
name: "Products: Allow Archives", name: "Products: Allow Archives",
}, },
GUILD_ROLE_SUBSCRIPTIONS: { GUILD_ROLE_SUBSCRIPTIONS: {
icon: "\u{1f4b3}", icon: SILK_ICONS.creditcards,
name: "Role Subscriptions", name: "Role Subscriptions",
deprecated: true, deprecated: true,
}, },
GUILD_ROLE_SUBSCRIPTION_PURCHASE_FEEDBACK_LOOP: { GUILD_ROLE_SUBSCRIPTION_PURCHASE_FEEDBACK_LOOP: {
icon: "\u{1f4b3}", icon: SILK_ICONS.creditcards,
name: "Role Subscriptions: Purchase Feedback Loop", name: "Role Subscriptions: Feedback Loop",
deprecated: true, deprecated: true,
}, },
GUILD_ROLE_SUBSCRIPTION_TIER_TEMPLATE: { GUILD_ROLE_SUBSCRIPTION_TIER_TEMPLATE: {
icon: "\u{1f4b3}", icon: SILK_ICONS.creditcards,
name: "Role Subscriptions: Tier Template", name: "Role Subscriptions: Tier Template",
deprecated: true, deprecated: true,
}, },
GUILD_ROLE_SUBSCRIPTION_TRIALS: { GUILD_ROLE_SUBSCRIPTION_TRIALS: {
icon: "\u{1f4b3}", icon: SILK_ICONS.creditcards,
name: "Role Subscriptions: Trials", name: "Role Subscriptions: Trials",
deprecated: true, deprecated: true,
}, },
GUILD_SERVER_GUIDE: {icon: "\u{1f9ae}", name: "Server Guide"}, GUILD_SERVER_GUIDE: {icon: SILK_ICONS.book_go, name: "Server Guide"},
GUILD_WEB_PAGE_VANITY_URL: { GUILD_WEB_PAGE_VANITY_URL: {
icon: "\u{1f4c4}", icon: SILK_ICONS.page_link,
name: "Guild Web Page Vanity URL", name: "Guild Web Page Vanity URL",
}, },
HAD_EARLY_ACTIVITIES_ACCESS: {icon: "\u{1f680}"}, HAD_EARLY_ACTIVITIES_ACCESS: {
HAS_DIRECTORY_ENTRY: {icon: "\u{1faa7}"}, icon: SILK_ICONS.joystick,
HIDE_FROM_EXPERIMENT_UI: {icon: "\u{1f9ea}"}, name: "Activities: Had Early Access",
HUB: {icon: "\u{1f3eb}"}, },
INCREASED_THREAD_LIMIT: {icon: "\u{1f9f5}"}, HAS_DIRECTORY_ENTRY: {icon: SILK_ICONS.book_open_mark},
INTERNAL_EMPLOYEE_ONLY: {icon: "\u{1f6e0}"}, HIDE_FROM_EXPERIMENT_UI: {
INVITE_SPLASH: {icon: "\u{1f5bc}"}, icon: SILK_ICONS.bug,
INVITES_DISABLED: {icon: "\u26d4"}, name: "Hidden from Experiment UI",
LINKED_TO_HUB: {icon: "\u{1f3eb}"}, },
LURKABLE: {icon: "\u{1f441}", deprecated: true}, HUB: {icon: SILK_ICONS.sitemap, name: "Student Hub"},
MARKETPLACES_CONNECTION_ROLES: {icon: "\u{1f517}", deprecated: true}, INCREASED_THREAD_LIMIT: {
MEDIA_CHANNEL_ALPHA: {icon: "\u{1f5bc}", deprecated: true}, icon: SILK_ICONS.comments,
MEMBER_LIST_DISABLED: {icon: "\u{1f6ab}", deprecated: true}, name: "Threads: Increased Limit",
MEMBER_PROFILES: {icon: "\u{1faaa}", deprecated: true}, },
MEMBER_SAFETY_PAGE_ROLLOUT: {icon: "\u{1f6e1}"}, INTERNAL_EMPLOYEE_ONLY: {
icon: SILK_ICONS.key,
name: "Staff: Internal Employee Only",
},
INVITE_SPLASH: {icon: SILK_ICONS.photo},
INVITES_DISABLED: {icon: SILK_ICONS.lock},
LINKED_TO_HUB: {icon: SILK_ICONS.sitemap, name: "Student Hub: Linked to Hub"},
LURKABLE: {icon: SILK_ICONS.eye, deprecated: true},
MARKETPLACES_CONNECTION_ROLES: {icon: SILK_ICONS.link, deprecated: true},
MEDIA_CHANNEL_ALPHA: {icon: SILK_ICONS.photo, deprecated: true},
MEMBER_LIST_DISABLED: {icon: SILK_ICONS.delete, deprecated: true},
MEMBER_PROFILES: {icon: SILK_ICONS.vcard, deprecated: true},
MEMBER_SAFETY_PAGE_ROLLOUT: {icon: SILK_ICONS.shield},
MEMBER_VERIFICATION_GATE_ENABLED: { MEMBER_VERIFICATION_GATE_ENABLED: {
icon: "\u{1f6e1}", icon: SILK_ICONS.shield,
name: "Member Verification Gate", name: "Member Verification Gate",
}, },
MEMBER_VERIFICATION_MANUAL_APPROVAL: { MEMBER_VERIFICATION_MANUAL_APPROVAL: {
icon: "\u2705", icon: SILK_ICONS.user_add,
name: "Member Join Requests", name: "Member Join Requests",
}, },
MOBILE_WEB_ROLE_SUBSCRIPTION_PURCHASE_PAGE: { MOBILE_WEB_ROLE_SUBSCRIPTION_PURCHASE_PAGE: {
icon: "\u{1f4b3}", icon: SILK_ICONS.creditcards,
name: "Role Subscriptions: Mobile Page", name: "Role Subscriptions: Mobile Page",
deprecated: true, deprecated: true,
}, },
MONETIZATION_ENABLED: {icon: "\u{1f4b0}", deprecated: true}, MONETIZATION_ENABLED: {icon: SILK_ICONS.money, deprecated: true},
MORE_EMOJI: {icon: "\u{1f603}"}, MORE_EMOJI: {icon: SILK_ICONS.emoticon_smile_add},
MORE_STICKERS: {icon: "\u{1f5bc}"}, MORE_STICKERS: {icon: SILK_ICONS.photo},
NEWS: {icon: "\u{1f4f0}"}, NEWS: {icon: SILK_ICONS.newspaper, name: "Announcement Channels"},
NEW_THREAD_PERMISSIONS: {icon: "\u{1f9f5}", deprecated: true}, NEW_THREAD_PERMISSIONS: {
NON_COMMUNITY_RAID_ALERTS: {icon: "\u{1f6a8}"}, icon: SILK_ICONS.comments,
PARTNERED: {icon: "\u267e\ufe0f"}, name: "Threads: New Permissions",
PREMIUM_TIER_3_OVERRIDE: {icon: "\u{1f48e}"}, deprecated: true,
PREVIEW_ENABLED: {icon: "\u{1f441}"}, },
PRIVATE_THREADS: {icon: "\u{1f9f5}", deprecated: true}, NON_COMMUNITY_RAID_ALERTS: {icon: SILK_ICONS.bell},
PARTNERED: {icon: SILK_ICONS.star},
PREMIUM_TIER_3_OVERRIDE: {icon: SILK_ICONS.ruby},
PREVIEW_ENABLED: {icon: SILK_ICONS.eye},
PRIVATE_THREADS: {
icon: SILK_ICONS.comments,
name: "Threads: Private Threads",
deprecated: true,
},
PRODUCTS_AVAILABLE_FOR_PURCHASE: { PRODUCTS_AVAILABLE_FOR_PURCHASE: {
icon: "\u{1f6cd}", icon: SILK_ICONS.basket,
name: "Products: Has Purchasable", name: "Products: Has Purchasable",
}, },
PUBLIC: {icon: "\u{1f9ed}", deprecated: true}, PUBLIC: {icon: SILK_ICONS.world, deprecated: true},
PUBLIC_DISABLED: {icon: "\u{1f6ab}", deprecated: true}, PUBLIC_DISABLED: {icon: SILK_ICONS.world_delete, deprecated: true},
RAID_ALERTS_DISABLED: {icon: "\u{1f6ab}"}, RAID_ALERTS_DISABLED: {icon: SILK_ICONS.bell_delete},
RAID_ALERTS_ENABLED: {icon: "\u{1f6a8}", deprecated: true}, RAID_ALERTS_ENABLED: {icon: SILK_ICONS.bell, deprecated: true},
RELAY_ENABLED: {icon: "\u{1f4fb}", name: "Sharded"}, RELAY_ENABLED: {icon: SILK_ICONS.transmit_blue, name: "Sharded"},
RESTRICT_SPAM_RISK_GUILDS: {icon: "\u{1f6d1}", deprecated: true}, RESTRICT_SPAM_RISK_GUILDS: {icon: SILK_ICONS.stop, deprecated: true},
ROLE_ICONS: {icon: "\u{1f3f7}"}, ROLE_ICONS: {icon: SILK_ICONS.tag_blue},
ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE: { ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE: {
icon: "\u{1f4b3}", icon: SILK_ICONS.creditcards,
name: "Role Subscriptions: Has Purchasable", name: "Role Subscriptions: Has Purchasable",
}, },
ROLE_SUBSCRIPTIONS_ENABLED: {icon: "\u{1f4b3}"}, ROLE_SUBSCRIPTIONS_ENABLED: {icon: SILK_ICONS.creditcards},
ROLE_SUBSCRIPTIONS_ENABLED_FOR_PURCHASE: { ROLE_SUBSCRIPTIONS_ENABLED_FOR_PURCHASE: {
icon: "\u{1f4b3}", icon: SILK_ICONS.creditcards,
name: "Role Subscriptions: Has Purchasable", name: "Role Subscriptions: Has Purchasable",
deprecated: true, deprecated: true,
}, },
SEVEN_DAY_THREAD_ARCHIVE: {icon: "\u{1f9f5}", deprecated: true}, SEVEN_DAY_THREAD_ARCHIVE: {
SHARD: {icon: "\u{1f4a0}", name: "Student Hub: Shard"}, icon: SILK_ICONS.comments,
name: "Threads: Seven Day Archive",
deprecated: true,
},
SHARD: {icon: SILK_ICONS.sitemap, name: "Student Hub: Shard"},
SHARED_CANVAS_FRIENDS_AND_FAMILY_TEST: { SHARED_CANVAS_FRIENDS_AND_FAMILY_TEST: {
icon: "\u{1f58c}", icon: SILK_ICONS.palette,
name: "Shared Canvas (Testing)", name: "Shared Canvas (Testing)",
}, },
SOUNDBOARD: {icon: "\u{1f50a}"}, SOUNDBOARD: {icon: SILK_ICONS.sound},
SUMMARIES_ENABLED: {icon: "\u{1f4da}", deprecated: true}, SUMMARIES_ENABLED: {icon: SILK_ICONS.book_tabs, deprecated: true},
SUMMARIES_ENABLED_GA: { SUMMARIES_ENABLED_GA: {
icon: "\u{1f4da}", icon: SILK_ICONS.book_tabs,
name: "Summaries (General Access)", name: "Summaries (General Access)",
}, },
SUMMARIES_DISABLED_BY_USER: {icon: "\u26d4"}, SUMMARIES_DISABLED_BY_USER: {icon: SILK_ICONS.book_tabs_delete},
SUMMARIES_ENABLED_BY_USER: {icon: "\u{1f4da}"}, SUMMARIES_ENABLED_BY_USER: {icon: SILK_ICONS.book_tabs},
SUMMARIES_LONG_LOOKBACK: { SUMMARIES_LONG_LOOKBACK: {
icon: "\u{1f5c2}", icon: SILK_ICONS.book_tabs,
name: "Summaries: Long Lookback", name: "Summaries: Long Lookback",
}, },
STAFF_LEVEL_COLLABORATOR_REQUIRED: { STAFF_LEVEL_COLLABORATOR_REQUIRED: {
icon: "\u{1f6e0}", icon: SILK_ICONS.key,
name: "Staff: Collaborators Only", name: "Staff: Collaborators Only",
}, },
STAFF_LEVEL_RESTRICTED_COLLABORATOR_REQUIRED: { STAFF_LEVEL_RESTRICTED_COLLABORATOR_REQUIRED: {
icon: "\u{1f6e0}", icon: SILK_ICONS.key,
name: "Staff: Restricted Collaborators Only", name: "Staff: Restricted Collaborators Only",
}, },
TEXT_IN_STAGE_ENABLED: {icon: "\u{1f5e8}", deprecated: true}, TEXT_IN_STAGE_ENABLED: {icon: SILK_ICONS.comments, deprecated: true},
TEXT_IN_VOICE_ENABLED: {icon: "\u{1f5e8}", deprecated: true}, TEXT_IN_VOICE_ENABLED: {icon: SILK_ICONS.comments, deprecated: true},
THREADS_ENABLED: {icon: "\u{1f9f5}", deprecated: true}, THREADS_ENABLED: {icon: SILK_ICONS.comments, deprecated: true},
THREADS_ENABLED_TESTING: { THREADS_ENABLED_TESTING: {
icon: "\u{1f9f5}", icon: SILK_ICONS.comments,
name: "Thread Enabled (Testing)", name: "Threads Enabled (Testing)",
deprecated: true, deprecated: true,
}, },
THREAD_DEFAULT_AUTO_ARCHIVE_DURATION: {icon: "\u{1f9f5}"}, THREAD_DEFAULT_AUTO_ARCHIVE_DURATION: {
icon: SILK_ICONS.comments,
name: "Threads: Default Auto Archive",
},
THREADS_ONLY_CHANNEL: { THREADS_ONLY_CHANNEL: {
icon: "\u{1f5e8}", icon: SILK_ICONS.comments,
name: "Forum Channels", name: "Forum Channels",
deprecated: true, deprecated: true,
}, },
THREE_DAY_THREAD_ARCHIVE: {icon: "\u{1f9f5}", deprecated: true}, THREE_DAY_THREAD_ARCHIVE: {
icon: SILK_ICONS.comments,
name: "Threads: Three Day Archive",
deprecated: true,
},
TICKETED_EVENTS_ENABLED: { TICKETED_EVENTS_ENABLED: {
icon: "\u{1f39f}", icon: SILK_ICONS.calendar,
name: "Scheduled Events", name: "Scheduled Events",
deprecated: true, deprecated: true,
}, },
TICKETING_ENABLED: { TICKETING_ENABLED: {
icon: "\u{1f39f}", icon: SILK_ICONS.calendar,
name: "Scheduled Events", name: "Scheduled Events",
deprecated: true, deprecated: true,
}, },
VALORANT_L30: {icon: "\u{1f3ae}", name: "Clans: Valorant L30"}, VALORANT_L30: {icon: SILK_ICONS.controller, name: "Clans: Valorant L30"},
VANITY_URL: {icon: "\u{1f517}"}, VANITY_URL: {icon: SILK_ICONS.link, name: "Vanity URL"},
VERIFIED: {icon: "\u2b50"}, VERIFIED: {icon: SILK_ICONS.tick},
VIP_REGIONS: {icon: "\u{1f399}"}, VIP_REGIONS: {icon: SILK_ICONS.microphone, name: "VIP Voice Regions"},
VOICE_CHANNEL_EFFECTS: {icon: "\u2728", deprecated: true}, VOICE_CHANNEL_EFFECTS: {icon: SILK_ICONS.wand, deprecated: true},
VOICE_IN_THREADS: {icon: "\u{1f399}"}, VOICE_IN_THREADS: {icon: SILK_ICONS.microphone},
WELCOME_SCREEN_ENABLED: {icon: "\u{1f44b}"}, WELCOME_SCREEN_ENABLED: {
icon: SILK_ICONS.application_view_tile,
name: "Onboarding: Welcome Screen",
},
}; };
const GUILD_VERIFICATION_LEVELS = [ const GUILD_VERIFICATION_LEVELS = [
@ -650,6 +757,37 @@ async function getGuild(id) {
return null; return null;
} }
function enumKeyToName(key) {
return key
.split("_")
.map((x) => x[0] + x.substring(1).toLowerCase())
.join(" ");
}
function formatGuildFeatures(features) {
return features
.sort((a, b) => {
const feature_a = GUILD_FEATURES[a];
const feature_b = GUILD_FEATURES[b];
return (feature_a?.name ?? enumKeyToName(a)).localeCompare(
feature_b?.name ?? enumKeyToName(b)
);
})
.map(
(feature) =>
`${GUILD_FEATURES[feature]?.icon ?? "\u2753"} ${
GUILD_FEATURES[feature]?.deprecated ? "~~" : ""
}${
GUILD_FEATURES[feature]?.name ??
feature
.split("_")
.map((x) => x[0] + x.substring(1).toLowerCase())
.join(" ")
}${GUILD_FEATURES[feature]?.deprecated ? "~~" : ""}`
);
}
// }}} // }}}
// {{{ commands // {{{ commands
@ -1007,18 +1145,7 @@ lookupinvite.callback = async function (msg, line) {
} }
: null; : null;
const features = invite.guild.features.sort().map( const features = formatGuildFeatures(invite.guild.features);
(feature) =>
`${GUILD_FEATURES[feature]?.icon ?? "\u2753"} ${
GUILD_FEATURES[feature]?.deprecated ? "~~" : ""
}${
GUILD_FEATURES[feature]?.name ??
feature
.split("_")
.map((x) => x[0] + x.substring(1).toLowerCase())
.join(" ")
}${GUILD_FEATURES[feature]?.deprecated ? "~~" : ""}`
);
if (invite.type == 0) { if (invite.type == 0) {
embed.fields.push( embed.fields.push(
@ -1779,7 +1906,7 @@ pomelo.callback = async function (msg, line) {
if (usernames.length == 1) { if (usernames.length == 1) {
const name = usernames[0]; const name = usernames[0];
if (name.length > 32 || !POMELO_REGEX.test(name)) if (name.length > 32 || !POMELO_REGEX.test(name))
return {reaction: "\u{1f6ab}"}; return {reaction: SILK_ICONS.delete};
const res = await hf.bot.requestHandler.request( const res = await hf.bot.requestHandler.request(
"POST", "POST",
@ -2452,22 +2579,11 @@ guildinfo.callback = async function (msg, line) {
).length; ).length;
embed.fields.push({ embed.fields.push({
name: "Member Count", name: "Member Count",
value: `<:online:1152111668856361010>${online} online\t\t<:offline:1152111682886316042>${guild.memberCount} members\n<:boat:546212361472835584> ${bots}, \u2713 ${verfifiedBots}`, value: `<:_:1152111668856361010>${online} online<:_:1250561747476152460><:_:1250561747476152460><:_:1152111682886316042>${guild.memberCount} members\n${SILK_ICONS.cog} ${bots}<:_:1250561747476152460>${SILK_ICONS.tick} ${verfifiedBots}`,
inline: false, inline: false,
}); });
const features = guild.features.sort().map( const features = formatGuildFeatures(guild.features);
(feature) =>
`${GUILD_FEATURES[feature]?.icon ?? "\u2753"} ${
GUILD_FEATURES[feature]?.deprecated ? "~~" : ""
}${
GUILD_FEATURES[feature]?.name ??
feature
.split("_")
.map((x) => x[0] + x.substring(1).toLowerCase())
.join(" ")
}${GUILD_FEATURES[feature]?.deprecated ? "~~" : ""}`
);
embed.fields.push({ embed.fields.push({
name: `Features (${features.length})`, name: `Features (${features.length})`,
@ -2588,18 +2704,7 @@ guildinfo.callback = async function (msg, line) {
inline: false, inline: false,
}); });
const features = guild.features.sort().map( const features = formatGuildFeatures(guild.features);
(feature) =>
`${GUILD_FEATURES[feature]?.icon ?? "\u2753"} ${
GUILD_FEATURES[feature]?.deprecated ? "~~" : ""
}${
GUILD_FEATURES[feature]?.name ??
feature
.split("_")
.map((x) => x[0] + x.substring(1).toLowerCase())
.join(" ")
}${GUILD_FEATURES[feature]?.deprecated ? "~~" : ""}`
);
embed.fields.push({ embed.fields.push({
name: `Features (${features.length})`, name: `Features (${features.length})`,
@ -2717,18 +2822,7 @@ guildinfo.callback = async function (msg, line) {
}); });
if (invite?.guild?.features) { if (invite?.guild?.features) {
const features = invite.guild.features.sort().map( const features = formatGuildFeatures(invite.guild.features);
(feature) =>
`${GUILD_FEATURES[feature]?.icon ?? "\u2753"} ${
GUILD_FEATURES[feature]?.deprecated ? "~~" : ""
}${
GUILD_FEATURES[feature]?.name ??
feature
.split("_")
.map((x) => x[0] + x.substring(1).toLowerCase())
.join(" ")
}${GUILD_FEATURES[feature]?.deprecated ? "~~" : ""}`
);
embed.fields.push({ embed.fields.push({
name: `Features (${features.length})`, name: `Features (${features.length})`,
@ -2817,18 +2911,7 @@ guildinfo.callback = async function (msg, line) {
inline: false, inline: false,
}); });
const features = invite.guild.features.sort().map( const features = formatGuildFeatures(invite.guild.features);
(feature) =>
`${GUILD_FEATURES[feature]?.icon ?? "\u2753"} ${
GUILD_FEATURES[feature]?.deprecated ? "~~" : ""
}${
GUILD_FEATURES[feature]?.name ??
feature
.split("_")
.map((x) => x[0] + x.substring(1).toLowerCase())
.join(" ")
}${GUILD_FEATURES[feature]?.deprecated ? "~~" : ""}`
);
embed.fields.push({ embed.fields.push({
name: `Features (${features.length})`, name: `Features (${features.length})`,