Repository: serenity-rs/serenity (language: rust)

Issue:
Use External Emojis shows up twice in formatted Permissions string
Reason:

There's actually just one permission, called USE_EXTERNAL_EMOJIS, but there's two shorthand accessor methods, called use_external_emojis() and external_emojis() (both using the same USE_EXTERNAL_EMOJIS internally). Every accessor method seems to be assigned an associated display name, which will be iterated when formatting permissions, and both use_external_emojis() and external_emojis() got the display name of "Use External Emojis"

Found in: https://discord.com/channels/381880193251409931/381912587505500160/1207880394725400626


Discussion / hints:

Fix patch:
diff --git a/src/model/permissions.rs b/src/model/permissions.rs
index 52da7392a0e..5c9b08654fd 100644
--- a/src/model/permissions.rs
+++ b/src/model/permissions.rs
@@ -379,7 +379,6 @@ generate_get_permission_names! {
     create_public_threads: "Create Public Threads",
     deafen_members: "Deafen Members",
     embed_links: "Embed Links",
-    external_emojis: "Use External Emojis",
     kick_members: "Kick Members",
     manage_channels: "Manage Channels",
     manage_events: "Manage Events",
@@ -568,15 +567,6 @@ impl Permissions {
         self.contains(Self::EMBED_LINKS)
     }
 
-    /// Shorthand for checking that the set of permissions contains the [Use External Emojis]
-    /// permission.
-    ///
-    /// [Use External Emojis]: Self::USE_EXTERNAL_EMOJIS
-    #[must_use]
-    pub const fn external_emojis(self) -> bool {
-        self.contains(Self::USE_EXTERNAL_EMOJIS)
-    }
-
     /// Shorthand for checking that the set of permissions contains the [Kick Members] permission.
     ///
     /// [Kick Members]: Self::KICK_MEMBERS


Test patch: