userdata
This commit is contained in:
@ -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(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user