mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Fix total users chat command, add help command
This commit is contained in:
@@ -15,6 +15,12 @@ impl Database {
|
||||
})
|
||||
}
|
||||
|
||||
pub async fn user_count(&self) -> Result<u64, sea_orm::DbErr> {
|
||||
crate::schema::user::Entity::find()
|
||||
.count(&self.orm)
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn user_by_display_name(&self, public_id: String) -> Result<Option<crate::schema::user::Model>, sea_orm::DbErr> {
|
||||
crate::schema::user::Entity::find()
|
||||
.filter(crate::schema::user::Column::DisplayName.eq(public_id))
|
||||
|
||||
Reference in New Issue
Block a user