This commit is contained in:
jude
2020-08-27 12:15:20 +01:00
parent ff09ccfd62
commit 2cde012c15
2 changed files with 94 additions and 18 deletions

View File

@ -13,7 +13,10 @@ use serenity::{
use regex::Regex;
use crate::{
models::ChannelData,
models::{
ChannelData,
UserData,
},
SQLPool,
};
@ -51,3 +54,13 @@ async fn blacklist(ctx: &Context, msg: &Message, args: String) -> CommandResult
Ok(())
}
#[command]
async fn timezone(ctx: &Context, msg: &Message, args: String) -> CommandResult {
let pool = ctx.data.read().await
.get::<SQLPool>().cloned().expect("Could not get SQLPool from data");
let user_data = UserData::from_id(&msg.author, &ctx, pool.clone()).await.unwrap();
Ok(())
}