Skip to content
Snippets Groups Projects
main.rs 553 B
Newer Older
Stephen D's avatar
Stephen D committed
#[macro_use]
extern crate diesel;
Stephen D's avatar
Stephen D committed

Stephen D's avatar
Stephen D committed
mod config;
mod framebuffer;
Stephen D's avatar
Stephen D committed
mod handlers;
Stephen D's avatar
Stephen D committed
mod joker;
Stephen D's avatar
Stephen D committed
mod models;
mod program;
mod schema;

Stephen D's avatar
Stephen D committed
use crate::handlers::Dispatcher;
Stephen D's avatar
Stephen D committed

use serenity::prelude::GatewayIntents;
Stephen D's avatar
Stephen D committed
use serenity::Client;
Stephen D's avatar
Stephen D committed

#[tokio::main]
async fn main() {
	let config = config::get_conf();
	let token = config.token;

	let mut client = Client::builder(&token, GatewayIntents::default())
Stephen D's avatar
Stephen D committed
		.event_handler(Dispatcher::default())
Stephen D's avatar
Stephen D committed
		.await
		.expect("Error creating client");
	if let Err(e) = client.start().await {
		eprintln!("Client error: {}", e);
Stephen D's avatar
Stephen D committed
	}
}