refactor: simplify code, better organize it, and comment it

This commit is contained in:
2023-11-25 22:01:02 +01:00
parent 75cd5dd7cb
commit d6b208963d
11 changed files with 303 additions and 130 deletions

View File

@@ -1,6 +1,7 @@
mod commands;
mod events;
pub mod utils;
pub mod error;
use poise::FrameworkBuilder;
use utils::serenity;
@@ -12,6 +13,11 @@ use self::events::event_handler;
pub type Result = ::std::result::Result<(), Error>;
/// Bootstraps the Discord bot.
///
/// # Panics
///
/// Panics if the environment `DISCORD_TOKEN` is unavailable.
pub fn make_bot() -> FrameworkBuilder<BotData, Error> {
poise::Framework::builder()
.options(poise::FrameworkOptions {