2025-02-14 01:03:42 +01:00
|
|
|
mod error_codes;
|
|
|
|
|
|
|
|
|
|
use std::env;
|
|
|
|
|
use once_cell::sync::Lazy;
|
|
|
|
|
use regex::Regex;
|
|
|
|
|
use serenity::async_trait;
|
|
|
|
|
use serenity::prelude::*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[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");
|
|
|
|
|
let intents = GatewayIntents::GUILD_MESSAGES
|
|
|
|
|
| GatewayIntents::MESSAGE_CONTENT;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let mut client = Client::builder(&token, intents)
|
|
|
|
|
.event_handler(error_codes::ErrorCodeHandler)
|
|
|
|
|
.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
|
|
|
}
|