Skip to content

Commit

Permalink
hi guys
Browse files Browse the repository at this point in the history
  • Loading branch information
ohld committed Jun 30, 2024
1 parent 81d3ccc commit 014d224
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tgbot/handlers/stats/wrapped.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def call_chatgpt(prompt: str) -> str:
async def handle_wrapped(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
user_id = update.effective_user.id

await create_user(id=user_id, nickname=update.effective_user.name)
await create_user(id=user_id)
await save_tg_user(
id=user_id,
username=update.effective_user.username,
Expand Down
2 changes: 1 addition & 1 deletion src/tgbot/handlers/upload/moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async def handle_uploaded_meme_review_button(
context: ContextTypes.DEFAULT_TYPE,
) -> None:
user = await get_user_info(update.effective_user.id)
if user["type"] != UserType.ADMIN:
if not UserType(user["type"]).is_moderator:
await update.callback_query.answer("You are not allowed to review memes")
return

Expand Down

0 comments on commit 014d224

Please sign in to comment.