{"id":11633,"date":"2026-04-28T18:00:56","date_gmt":"2026-04-28T09:00:56","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=11633"},"modified":"2026-04-28T18:00:56","modified_gmt":"2026-04-28T09:00:56","slug":"botfather%eb%a5%bc-%ec%9d%b4%ec%9a%a9%ed%95%9c-%ed%85%94%eb%a0%88%ea%b7%b8%eb%9e%a8-%eb%b4%87-%ec%83%9d%ec%84%b1","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=11633","title":{"rendered":"BotFather\ub97c \uc774\uc6a9\ud55c \ud154\ub808\uadf8\ub7a8 \ubd07 \uc0dd\uc131"},"content":{"rendered":"<h1>BotFather\ub97c \uc774\uc6a9\ud55c \ud154\ub808\uadf8\ub7a8 \ubd07 \uc0dd\uc131<\/h1>\n<p>BotFather\ub97c \uc774\uc6a9\ud55c \ud154\ub808\uadf8\ub7a8 \ubd07 \uc0dd\uc131 \uacfc\uc815\uc744 \uc124\uba85\ud569\ub2c8\ub2e4.<\/p>\n<h2>BotFather \uac80\uc0c9<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2026\/04\/image-1777364178878.png\" alt=\"file\" \/><\/p>\n<h2>\ubd07 \uc0dd\uc131<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2026\/04\/image-1777364222588.png\" alt=\"file\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2026\/04\/image-1777364327089.png\" alt=\"file\" \/><\/p>\n<h2>API \ud0a4 \ubc1b\uae30<\/h2>\n<p>\uc720\ucd9c\ub418\uc5b4\uc11c\ub294 \uc54a\ub429\ub2c8\ub2e4.<br \/>\n\uc720\ucd9c\uc774 \uc758\uc2ec\ub418\uba74 \uc7ac\ubc1c\uae09 \ubc1b\uc73c\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2026\/04\/image-1777364362371.png\" alt=\"file\" \/><\/p>\n<h2>\ubd07 \ucc3e\uae30<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2026\/04\/image-1777364437455.png\" alt=\"file\" \/><\/p>\n<h2>\uc548\uc804\ud558\uac8c \uc0ac\uc6a9<\/h2>\n<p>\uae30\ubcf8\uc801\uc73c\ub85c \ub204\uad6c\ub098 \ubd07\uc5d0 \uc811\uadfc\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4.<\/p>\n<p>\ub300\ud654\ucc3d\uc5d0\uc11c @userinfobot \ub97c \uac80\uc0c9\ud574\uc11c \ub4e4\uc5b4\uac11\ub2c8\ub2e4.<br \/>\n\ubd07\uc774 \uc54c\ub824\uc8fc\ub294 \uc22b\uc790\uac00 \ub0b4 \uc544\uc774\ub514\uc785\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-python\">from telegram import Update\nfrom telegram.ext import ApplicationBuilder, ContextTypes, CommandHandler, filters, MessageHandler\n\n# 1. \ud5c8\uc6a9\ud560 \uad00\ub9ac\uc790 ID \uc124\uc815 (\ubcf8\uc778\uc758 ID \uc785\ub825)\nADMIN_ID = 123456789\n\n# 2. \uba85\ub839\uc5b4 \ucc98\ub9ac \ud568\uc218\nasync def start(update: Update, context: ContextTypes.DEFAULT_TYPE):\n    await update.message.reply_text(&quot;\uc778\uc99d\ub41c \uc0ac\uc6a9\uc790\uc785\ub2c8\ub2e4. \uba85\ub839\uc744 \uc218\ud589\ud569\ub2c8\ub2e4.&quot;)\n\n# 3. \ube44\uc778\uac00 \uc0ac\uc6a9\uc790 \ucc98\ub9ac \ud568\uc218 (\uc120\ud0dd \uc0ac\ud56d)\nasync def unauthorized(update: Update, context: ContextTypes.DEFAULT_TYPE):\n    user_id = update.effective_user.id\n    await update.message.reply_text(f&quot;\uc811\uadfc \uad8c\ud55c\uc774 \uc5c6\uc2b5\ub2c8\ub2e4. (ID: {user_id})&quot;)\n\nif __name__ == &#039;__main__&#039;:\n    application = ApplicationBuilder().token(&#039;YOUR_BOT_TOKEN&#039;).build()\n\n    # \ud654\uc774\ud2b8\ub9ac\uc2a4\ud2b8 \ud544\ud130 \uc0dd\uc131\n    admin_filter = filters.User(user_id=ADMIN_ID)\n\n    # 4. \ud578\ub4e4\ub7ec \ub4f1\ub85d\n    # filters=admin_filter\ub97c \ud1b5\ud574 \ud574\ub2f9 ID\uac00 \uc544\ub2cc \uacbd\uc6b0 \uc774 \ud578\ub4e4\ub7ec\ub294 \ubb34\uc2dc\ub429\ub2c8\ub2e4.\n    application.add_handler(CommandHandler(&quot;start&quot;, start, filters=admin_filter))\n\n    # (\uc635\uc158) \uad00\ub9ac\uc790\uac00 \uc544\ub2cc \ubaa8\ub4e0 \uba54\uc2dc\uc9c0\ub97c \uac00\ub85c\ucc44\uc11c \uc548\ub0b4 \uba54\uc2dc\uc9c0 \ucd9c\ub825\n    application.add_handler(MessageHandler(~admin_filter, unauthorized))\n\n    application.run_polling()<\/code><\/pre>\n<pre><code class=\"language-bash\">python3 -m venv venv\nsource venv\/bin\/activate\npython3 -m pip install python-telegram-bot<\/code><\/pre>\n<p>\ud154\ub808\uadf8\ub7a8\uc5d0\uc11c \ubd07 \ub300\ud654\ucc3d\uc744 \uc5fd\ub2c8\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2026\/04\/image-1777366847110.png\" alt=\"file\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>BotFather\ub97c \uc774\uc6a9\ud55c \ud154\ub808\uadf8\ub7a8 \ubd07 \uc0dd\uc131 BotFather\ub97c \uc774\uc6a9\ud55c \ud154\ub808\uadf8\ub7a8 \ubd07 \uc0dd\uc131 \uacfc\uc815\uc744 \uc124\uba85\ud569\ub2c8\ub2e4. BotFather \uac80\uc0c9 \ubd07 \uc0dd\uc131 API \ud0a4 \ubc1b\uae30 \uc720\ucd9c\ub418\uc5b4\uc11c\ub294 \uc54a\ub429\ub2c8\ub2e4. \uc720\ucd9c\uc774 \uc758\uc2ec\ub418\uba74 \uc7ac\ubc1c\uae09 \ubc1b\uc73c\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4. \ubd07 \ucc3e\uae30 \uc548\uc804\ud558\uac8c \uc0ac\uc6a9 \uae30\ubcf8\uc801\uc73c\ub85c \ub204\uad6c\ub098 \ubd07\uc5d0 \uc811\uadfc\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4. \ub300\ud654\ucc3d\uc5d0\uc11c @userinfobot \ub97c \uac80\uc0c9\ud574\uc11c \ub4e4\uc5b4\uac11\ub2c8\ub2e4. \ubd07\uc774 \uc54c\ub824\uc8fc\ub294 \uc22b\uc790\uac00 \ub0b4 \uc544\uc774\ub514\uc785\ub2c8\ub2e4. from telegram import Update from telegram.ext import ApplicationBuilder, ContextTypes, CommandHandler,\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=11633\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-11633","post","type-post","status-publish","format-standard","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/11633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11633"}],"version-history":[{"count":1,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/11633\/revisions"}],"predecessor-version":[{"id":11640,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/11633\/revisions\/11640"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}