refactor: simplify code, better organize it, and comment it
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user