From 9269f6809c046c53b7bedbb1cb32fb27f164be15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=94=E7=9A=87=E5=9C=B0=E7=8B=B1?= Date: Mon, 14 Oct 2024 09:49:01 +0800 Subject: [PATCH 1/2] Update readme.md --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index ab0c367..41eeae2 100644 --- a/readme.md +++ b/readme.md @@ -29,7 +29,7 @@ COOKIES = { ``` # 使用说明 -默认命令为: +默认命令为: /music 509728841, 33682739, ...[^使用id下载网易云音乐(支持等级切换,最多10个)] /musicname 恋爱循环或者461011[^通过id或者关键词下载网易云音乐(支持等级切换)] /playlist 801764896 0 10[^通过歌单id进行下载(一次最多10个)] @@ -42,4 +42,4 @@ https://music.mhdy.shop **[我的发布页](https://mohuangdiyu.com)** # 赞助 -![赞助](https://fj.mhdyapp.buzz/2024-08-05-04-23-46.jpg) \ No newline at end of file +![赞助](https://fj.mhdyapp.buzz/2024-08-05-04-23-46.jpg) From 8157f62e64204bba60873de89922cd0045afad0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=94=E7=9A=87=E5=9C=B0=E7=8B=B1?= Date: Mon, 14 Oct 2024 09:49:35 +0800 Subject: [PATCH 2/2] Delete ceshi.py --- ceshi.py | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 ceshi.py diff --git a/ceshi.py b/ceshi.py deleted file mode 100644 index 7a76b53..0000000 --- a/ceshi.py +++ /dev/null @@ -1,39 +0,0 @@ -from telegram import InlineKeyboardButton, InlineKeyboardMarkup -from telegram.ext import ApplicationBuilder, CommandHandler, CallbackQueryHandler -from config import API_TOKEN -from telegram import InlineKeyboardButton, InlineKeyboardMarkup - -async def send_button(update, context): - chat_id = update.message.chat_id - - # 创建按钮 - button = InlineKeyboardButton(text="点击我", callback_data="button_clicked") - - # 创建包含按钮的键盘 - keyboard = [[button]] - reply_markup = InlineKeyboardMarkup(keyboard) - - # 发送消息并附带按钮 - await context.bot.send_message(chat_id=chat_id, text="选择一个按钮:", reply_markup=reply_markup) - -# 回调处理函数 -async def button_callback(update, context): - query = update.callback_query - query.answer() - - # 响应按钮点击 - await query.edit_message_text(text=f"你点击了: {query.data}") - - -def main(): - app = ApplicationBuilder().token(API_TOKEN).build() - - app.add_handler(CommandHandler('start', send_button)) - app.add_handler(CallbackQueryHandler(button_callback)) - - app.run_polling() - -if __name__ == '__main__': - main() -# 添加到你的命令处理器中 -