f*cking i am! f*cking i32!
Some checks failed
Docker Push / docker (push) Has been cancelled

This commit is contained in:
Shiroyasha 2025-01-28 21:46:03 +03:00
parent 3132ebd036
commit 655e195c91
Signed by: shiroyashik
GPG key ID: E4953D3940D7860A
2 changed files with 2 additions and 2 deletions

View file

@ -29,7 +29,7 @@ pub async fn inline(bot: Bot, q: CallbackQuery, state: Arc<AppState>, uid: Strin
if let Some(data) = q.clone().data {
let text= if &data == "yes" {
if let Ok(uid) = uid.parse::<u64>() {
if Entity::delete_by_id(uid as i32).exec(&state.db).await?.rows_affected != 0 {
if Entity::delete_by_id(uid as i64).exec(&state.db).await?.rows_affected != 0 {
"Модератор удалён!"
} else {
"Произошла ошибка!\nПо всей видимости такого модератора не существует."

View file

@ -8,7 +8,7 @@ use crate::AppState;
/// Invert notify status for moderator
pub async fn command(bot: Bot, msg: Message, uid: UserId, state: Arc<AppState>) -> anyhow::Result<()> {
let text = if let Some(moder) = moderators::Entity::find_by_id(uid.0 as i32).one(&state.db).await? {
let text = if let Some(moder) = moderators::Entity::find_by_id(uid.0 as i64).one(&state.db).await? {
let moder = match moder.notify {
true => {
let mut moder = moder.into_active_model();