feat: database migrations

This commit is contained in:
Jef Roosens 2023-05-16 16:25:33 +02:00
parent 0b10885015
commit 04e268a17c
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
9 changed files with 108 additions and 28 deletions

View file

@ -1,4 +1,4 @@
use crate::db::users::{User, NewUser};
use crate::db::users::{NewUser, User};
use crate::{Context, Error};
use diesel::RunQueryDsl;
@ -22,8 +22,11 @@ pub async fn register(
let mut conn = ctx.data().pool.get()?;
new_user.insert(&mut conn);
}
ctx.say("You have been registered.").await?;
} else {
ctx.say("You have to send this message from a guild.").await?;
ctx.say("You have to send this message from a guild.")
.await?;
}
Ok(())