insert a user when necessary

This commit is contained in:
jude-lafitteIII 2020-05-20 23:25:08 +01:00
parent 64366ce071
commit efe9e34669

View File

@ -974,6 +974,16 @@ async fn set_greet_sound(ctx: &Context, msg: &Message, args: Args) -> CommandRes
let query = args.rest(); let query = args.rest();
let user_id = *msg.author.id.as_u64(); let user_id = *msg.author.id.as_u64();
let _ = sqlx::query!(
"
INSERT IGNORE INTO users (user)
VALUES (?)
",
user_id
)
.execute(&pool)
.await;
if query.len() == 0 { if query.len() == 0 {
sqlx::query!( sqlx::query!(
" "