2025-02-14 14:18:09 +01:00
|
|
|
mod ayy;
|
2025-06-04 15:18:21 +02:00
|
|
|
mod cheeseburger;
|
|
|
|
|
mod emergency_report;
|
|
|
|
|
mod error_codes;
|
|
|
|
|
mod fest_fax;
|
2025-02-14 14:18:09 +01:00
|
|
|
mod miiverse_mod_application;
|
2025-02-14 22:50:15 +01:00
|
|
|
mod too_fat;
|
2025-02-14 01:03:42 +01:00
|
|
|
|
|
|
|
|
use once_cell::sync::Lazy;
|
|
|
|
|
use regex::Regex;
|
|
|
|
|
use serenity::async_trait;
|
|
|
|
|
use serenity::prelude::*;
|
2025-06-04 15:18:21 +02:00
|
|
|
use std::env;
|
2025-02-14 01:03:42 +01:00
|
|
|
|
|
|
|
|
#[tokio::main(flavor = "current_thread")]
|
2025-02-13 20:31:49 +01:00
|
|
|
async fn main() {
|
2025-02-14 01:03:42 +01:00
|
|
|
dotenv::dotenv().ok();
|
|
|
|
|
|
|
|
|
|
let token = env::var("PROFESSOR_TOKEN").expect("Token not specified");
|
2025-06-04 15:18:21 +02:00
|
|
|
let intents = GatewayIntents::GUILD_MESSAGES | GatewayIntents::MESSAGE_CONTENT;
|
2025-02-14 01:03:42 +01:00
|
|
|
|
|
|
|
|
let mut client = Client::builder(&token, intents)
|
|
|
|
|
.event_handler(error_codes::ErrorCodeHandler)
|
2025-02-14 14:18:09 +01:00
|
|
|
.event_handler(ayy::AyyHandler)
|
|
|
|
|
.event_handler(cheeseburger::CheeseburgerHandler)
|
2025-02-14 22:50:15 +01:00
|
|
|
.event_handler(too_fat::TooFatHandler)
|
2025-02-15 01:44:17 +01:00
|
|
|
.event_handler(emergency_report::EmergencyReportHandler::default())
|
2025-02-15 02:18:44 +01:00
|
|
|
.event_handler(miiverse_mod_application::MiiverseModApplicationHandler::default())
|
2025-06-04 15:18:21 +02:00
|
|
|
//.event_handler(fest_fax::FestFaxHandler::default())
|
|
|
|
|
.await
|
|
|
|
|
.expect("unable to create client");
|
2025-02-13 20:31:49 +01:00
|
|
|
|
2025-02-14 01:03:42 +01:00
|
|
|
client.start().await.expect("error running bot");
|
2025-02-13 20:31:49 +01:00
|
|
|
}
|