pub fn add_permission(
        &mut self,
        permission: CreateApplicationCommandPermissionData,
    ) -> &mut Self {
        let new_data = utils::hashmap_to_json_map(permission.0);
        let permissions = self.0.entry("permissions").or_insert_with(|| Value::Array(Vec::new()));

        let permissions_array = permissions.as_array_mut().expect("Must be an array");

        permissions_array.push(Value::Object(new_data));

        self
    }
/// Adds a permission for the interaction.
Adds a permission for the interaction.
Adds a permission for the interaction .
pub fn add_permission(
        &mut self,
        permission: CreateApplicationCommandPermissionData,
    ) -> &mut Self {
        let new_data = utils::hashmap_to_json_map(permission.0);
        let permissions = self.0.entry("permissions").or_insert_with(|| Value::Array(Vec::new()));
        let permissions_array = permissions.as_array_mut().expect("Must be an array");
        permissions_array.push(Value::Object(new_data));
        self
    }
pub fn add_permission ( & mut self , permission : CreateApplicationCommandPermissionData , ) -> & mut Self { let new_data = utils :: hashmap_to_json_map ( permission . 0 ) ; let permissions = self . 0 . entry ( " " ) . or_insert_with ( | | Value :: Array ( Vec :: new ( ) ) ) ; let permissions_array = permissions . as_array_mut ( ) . expect ( " " ) ; permissions_array . push ( Value :: Object ( new_data ) ) ; self }
Adds a permission for the interaction.
Adds a permission for the interaction .
&mut self
permission
CreateApplicationCommandPermissionData