refactor: simplify code, better organize it, and comment it
This commit is contained in:
@@ -6,6 +6,14 @@ pub struct BotData {
|
||||
}
|
||||
|
||||
impl BotData {
|
||||
/// Initialize state data for bot.
|
||||
///
|
||||
/// For now, this only includes a connector to its database.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// This function will return an error if the database fails to
|
||||
/// initialize.
|
||||
pub async fn new() -> color_eyre::Result<Self> {
|
||||
Ok(Self {
|
||||
database: Database::new().await?,
|
||||
|
||||
Reference in New Issue
Block a user