bot commited on
Commit
fae2328
·
1 Parent(s): 57baf4e
Files changed (1) hide show
  1. main.py +4 -2
main.py CHANGED
@@ -125,7 +125,10 @@ TG_BASE_URL = "https://tg.alist.dpdns.org/bot"
125
  ###################TG机器人功能区###################
126
  # 定义命令处理函数
127
  async def start(update: Update, context):
128
- await update.message.reply_text("你好!我是一个 FastAPI + Telegram 机器人!")
 
 
 
129
 
130
 
131
  async def help(update: Update, context):
@@ -168,7 +171,6 @@ async def init_client():
168
  TG_BOT_APPLICATION = (
169
  Application.builder().base_url(TG_BASE_URL).token(TG_BOT_TOKEN).build()
170
  )
171
- print("==========test==============")
172
  # await TG_BOT_APPLICATION.bot.delete_webhook()
173
  await TG_BOT_APPLICATION.bot.set_webhook(TG_WEBHOOK_URL)
174
  await TG_BOT_APPLICATION.initialize()
 
125
  ###################TG机器人功能区###################
126
  # 定义命令处理函数
127
  async def start(update: Update, context):
128
+ commands = (
129
+ "欢迎使用我的机器人!\n\n" "以下是您可以使用的命令:\n" "/help - 获取帮助信息\n"
130
+ )
131
+ await update.message.reply_text(commands)
132
 
133
 
134
  async def help(update: Update, context):
 
171
  TG_BOT_APPLICATION = (
172
  Application.builder().base_url(TG_BASE_URL).token(TG_BOT_TOKEN).build()
173
  )
 
174
  # await TG_BOT_APPLICATION.bot.delete_webhook()
175
  await TG_BOT_APPLICATION.bot.set_webhook(TG_WEBHOOK_URL)
176
  await TG_BOT_APPLICATION.initialize()