stat_summoner/module/suggestions/
mod.rs

1pub mod interaction_black_list;
2/// 🛠 **Module suggestions**: Contains the logic and utilities for handling suggestions and interactions related to blacklisting.
3///
4/// This module organizes the functionality for the `suggestion` command and the interaction handling for
5/// blacklisting users. Each component is separated into its respective file for clarity and modularity.
6///
7/// # Files in this module:
8/// - `suggestions.rs`: Handles the `suggestion` command, which allows users to submit suggestions and includes the logic for embedding those suggestions in Discord.
9/// - `interaction_black_list.rs`: Handles interactions with the "Blacklist User" button, including adding users to the blacklist and deleting the associated suggestion messages.
10/// - `utils.rs`: Contains utility functions shared across the `suggestions` module, such as checking if a user is blacklisted and adding users to the blacklist.
11///
12/// # Example:
13/// To use the commands and interaction handlers in this module, ensure they are registered in the bot's main framework setup:
14///
15/// ```rust
16/// use module::suggestions::suggestions::suggestion;
17/// use module::suggestions::interaction_black_list::handle_button_click;
18///
19/// #[shuttle_runtime::main]
20/// async fn main() {
21///     let framework = poise::Framework::builder()
22///         .options(poise::FrameworkOptions {
23///             commands: vec![suggestion()], // Register the suggestion command
24///             event_handler: |ctx, event, _framework, data| {
25///                 Box::pin(async move {
26///                     if let Some(interaction) = event.interaction_create() {
27///                         handle_button_click(ctx.clone(), interaction.clone(), data).await?;
28///                     }
29///                     Ok(())
30///                 })
31///             },
32///             ..Default::default()
33///         })
34///         .build();
35/// }
36/// ```
37///
38/// As more features are added to this module, they will be included here and imported into the main bot setup.
39pub mod suggestions;
40pub mod utils;