Skip to content

Commit 319e0ae

Browse files
committed
Remove unused interaction convenience helpers
1 parent eb01f24 commit 319e0ae

1 file changed

Lines changed: 1 addition & 28 deletions

File tree

src/interaction/model.rs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::{InteractionData, InteractionDataType, InteractionType};
1+
use super::{InteractionData, InteractionType};
22
use crate::models::serde_helpers::{deserialize_string_or_number, is_default};
33
use serde::{Deserialize, Serialize};
44
use serde_json::Value;
@@ -71,33 +71,6 @@ impl Interaction {
7171
version: wire.version,
7272
}
7373
}
74-
75-
/// Check if this is a button interaction
76-
pub fn is_button_interaction(&self) -> bool {
77-
matches!(
78-
self.data.data_type,
79-
Some(InteractionDataType::InlineKeyboardButtonClick)
80-
)
81-
}
82-
83-
/// Check if this is a command interaction
84-
pub fn is_command_interaction(&self) -> bool {
85-
matches!(
86-
self.interaction_type,
87-
Some(InteractionType::ApplicationCommand)
88-
)
89-
}
90-
91-
/// Get the button ID if this is a button interaction
92-
pub fn button_id(&self) -> Option<&str> {
93-
(!self.data.resolved.button_id.is_empty()).then_some(self.data.resolved.button_id.as_str())
94-
}
95-
96-
/// Get the button data if this is a button interaction
97-
pub fn button_data(&self) -> Option<&str> {
98-
(!self.data.resolved.button_data.is_empty())
99-
.then_some(self.data.resolved.button_data.as_str())
100-
}
10174
}
10275

10376
impl std::fmt::Display for Interaction {

0 commit comments

Comments
 (0)