feat: 도메인 인라인 버튼 등록 + cheapest TLD + Cron 자동취소
- 도메인 등록 인라인 버튼 확인 플로우 (domain-register.ts) - manage_domain에 cheapest action 추가 (가장 저렴한 TLD TOP 15) - 24시간 경과 입금 대기 자동 취소 Cron (UTC 15:00) - 거래 내역 한글 라벨 + description 표시 - CLAUDE.md 문서 업데이트 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,7 @@ export async function setWebhook(
|
||||
body: JSON.stringify({
|
||||
url: webhookUrl,
|
||||
secret_token: secretToken,
|
||||
allowed_updates: ['message'],
|
||||
allowed_updates: ['message', 'callback_query'],
|
||||
drop_pending_updates: true,
|
||||
}),
|
||||
}
|
||||
@@ -153,3 +153,63 @@ export async function sendChatAction(
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Callback Query 응답 (버튼 클릭 알림)
|
||||
export async function answerCallbackQuery(
|
||||
token: string,
|
||||
callbackQueryId: string,
|
||||
options?: {
|
||||
text?: string;
|
||||
show_alert?: boolean;
|
||||
}
|
||||
): Promise<boolean> {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`https://api.telegram.org/bot${token}/answerCallbackQuery`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
callback_query_id: callbackQueryId,
|
||||
text: options?.text,
|
||||
show_alert: options?.show_alert,
|
||||
}),
|
||||
}
|
||||
);
|
||||
return response.ok;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 메시지 수정 (인라인 키보드 제거/변경용)
|
||||
export async function editMessageText(
|
||||
token: string,
|
||||
chatId: number,
|
||||
messageId: number,
|
||||
text: string,
|
||||
options?: {
|
||||
parse_mode?: 'HTML' | 'Markdown' | 'MarkdownV2';
|
||||
reply_markup?: { inline_keyboard: InlineKeyboardButton[][] };
|
||||
}
|
||||
): Promise<boolean> {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`https://api.telegram.org/bot${token}/editMessageText`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
chat_id: chatId,
|
||||
message_id: messageId,
|
||||
text,
|
||||
parse_mode: options?.parse_mode || 'HTML',
|
||||
reply_markup: options?.reply_markup,
|
||||
}),
|
||||
}
|
||||
);
|
||||
return response.ok;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user