diff --git a/src/framework/bot.rs b/src/framework/bot.rs index 99440e4..477cdf1 100644 --- a/src/framework/bot.rs +++ b/src/framework/bot.rs @@ -27,8 +27,23 @@ pub enum RuntimeError { ApplicationFetchingFailed, } +/// Getter trait for command prefixes. #[async_trait] pub trait PrefixGetter { + /// Get the command prefixes for the given server and user IDs. + /// + /// The getter must never fail. In case an internal process does, it must fall back to default + /// prefixes. + /// + /// Arguments: + /// * `runtime` - The application [`Runtime`]. + /// * `server_id` - The server ID in which the command, interaction, or event is running. + /// * `user_id` - The user ID who triggered the command, interaction, or event. + /// + /// Returns: + /// [`Vec`] - A list of command prefixes. When matching for commands, all these + /// prefixes should be checked against, as they're all valid. In case one should be picked, the + /// first one will always be the safest choice. async fn get( &self, runtime: &Runtime,