From 5999e6a803a7b848acf054918fec9ee5024d5697 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Tue, 3 May 2022 13:57:09 -0400 Subject: filter: Initial message filter implementation Also a custom error type, tracing_subscriber, and unsafe impls --- src/main.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 88d612e..38a849b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -#![forbid(missing_docs)] +#![deny(missing_docs)] /*! * Full rewrite of the [Glitch](https://glitchbot.net) bot in Poise with slash commands * @@ -17,6 +17,7 @@ type Context<'a> = poise::Context<'a, Data, Error>; mod commands; mod handler; mod models; +mod errors; /// Contains data shared between all commands pub struct Data { @@ -70,6 +71,7 @@ async fn register(ctx: Context<'_>, #[flag] global: bool) -> Result<(), Error> { async fn main() { // Initialize environment and logging dotenv().unwrap(); + color_eyre::install().unwrap(); tracing_subscriber::fmt::init(); info!("Initialized logging"); let options = poise::FrameworkOptions { @@ -94,6 +96,13 @@ async fn main() { ], ..commands::reactionroles::rroles() }, + poise::Command { + subcommands: vec![ + commands::filters::list(), + commands::filters::add(), + ], + ..commands::filters::filter() + }, ], // This requires a closure, for some reason on_error: |error| Box::pin(on_error(error)), -- cgit v1.2.3