feat: database migrations
This commit is contained in:
parent
0b10885015
commit
04e268a17c
9 changed files with 108 additions and 28 deletions
|
|
@ -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(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue