Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions app/slack/handlers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from html import unescape
from typing import Any

from app.grad_2025.enums import ReviewStatus
Expand Down Expand Up @@ -118,12 +119,14 @@ async def handle_status_blocks(self, name: str) -> dict[str, Any]:

async def handle_rename(self, args: str) -> dict[str, Any]:
"""학과 이름을 변경합니다. 사용법: @bot rename 기존이름 -> 새이름"""
if "->" not in args:
normalized_args = unescape(args).replace("→", "->").strip()

if "->" not in normalized_args:
return {
"text": "❌ 사용법: `@bot rename 기존이름 -> 새이름`\n예: `@bot rename 홍익대 시각디자인 -> 홍익대학교 시각디자인과`"
}

parts = args.split("->")
parts = normalized_args.split("->")
if len(parts) != 2:
return {
"text": "❌ 사용법: `@bot rename 기존이름 -> 새이름`\n예: `@bot rename 홍익대 시각디자인 -> 홍익대학교 시각디자인과`"
Expand Down
Loading