chore: strip bot model from quark
This commit is contained in:
@@ -469,7 +469,10 @@ impl User {
|
||||
#[async_recursion]
|
||||
pub async fn from_token(db: &Database, token: &str, hint: UserHint) -> Result<User> {
|
||||
match hint {
|
||||
UserHint::Bot => db.fetch_user(&db.fetch_bot_by_token(token).await?.id).await,
|
||||
UserHint::Bot => {
|
||||
let rvdb: revolt_database::Database = db.clone().into();
|
||||
db.fetch_user(&rvdb.fetch_bot_by_token(token).await.map_err(|_| Error::InternalError)?.id).await
|
||||
},
|
||||
UserHint::User => db.fetch_user_by_token(token).await,
|
||||
UserHint::Any => {
|
||||
if let Ok(user) = User::from_token(db, token, UserHint::User).await {
|
||||
|
||||
Reference in New Issue
Block a user