aboutsummaryrefslogtreecommitdiff
path: root/src/wisp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wisp.rs')
-rw-r--r--src/wisp.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/wisp.rs b/src/wisp.rs
index e1f2310..f870bda 100644
--- a/src/wisp.rs
+++ b/src/wisp.rs
@@ -5,6 +5,10 @@ use crate::core::{
framework::WispFramework,
timers
};
+// use crate::webserver::{
+// model::*,
+// rocket::*
+// };
use serenity::Error as SerenityError;
use serenity::http;
use serenity::model::id::UserId;
@@ -16,6 +20,7 @@ use std::sync::Arc;
pub struct WispClient(Client);
impl WispClient {
+ // #[tokio::main]
pub fn new() -> Self {
let token = env::var("DISCORD_TOKEN").expect("Expected Discord bot token in environment.");
let mut client = Client::new(&token, Handler).expect("Unable to initialize Wisp client.");
@@ -38,6 +43,17 @@ impl WispClient {
},
Err(why) => panic!("Couldn't get the application info: {:?}", why),
};
+
+ // let bot = WispData {
+ // data: Arc::new(Mutex::new(TypeMap::new()))
+ // };
+ // let bot_clone = bot.clone();
+ // unsafe {
+ // tokio::spawn(async move {
+ // let _ = start_rocket(bot_clone);
+ // });
+ // }
+
client.with_framework(WispFramework::new(owners));
WispClient(client)
}