From dccf2f65f3fa20343889b630123eb8815f7d1bb1 Mon Sep 17 00:00:00 2001 From: Assalom605 Date: Sun, 10 Nov 2024 20:05:00 +0000 Subject: [PATCH] from telegram import Update from telegram.ext import Updater, CommandHandler, CallbackContext TOKEN = '7657310609:AAEJVfKl0qJ0sR2MPm_rPvgxCZ4yX1pZj0w' def start(update: Update, context: CallbackContext): update.message.reply_text('Salom! Men Telegram botiman.') # Botni ishga tushurish def main(): updater = Updater(TOKEN, use_context=True) dispatcher = updater.dispatcher # /start komandasini qayta ishlash dispatcher.add_handler(CommandHandler("start", start)) # Botni ishga tushirish updater.start_polling() updater.idle() if __name__ == '__main__': main() --- .github/telegram | 1 + README.md | 2 +- webhook_test.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .github/telegram diff --git a/.github/telegram b/.github/telegram new file mode 100644 index 0000000..3cf2e93 --- /dev/null +++ b/.github/telegram @@ -0,0 +1 @@ +https://api.telegram.org/bot<7657310609:AAEJVfKl0qJ0sR2MPm_rPvgxCZ4yX1pZj0w>/setWebhook?url=/<7657310609:AAEJVfKl0qJ0sR2MPm_rPvgxCZ4yX1pZj0w>> \ No newline at end of file diff --git a/README.md b/README.md index c9b43a5..0fee9e1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# What is webhook? ![build-status][badge] +ber# What is webhook? ![build-status][badge] Webhook diff --git a/webhook_test.go b/webhook_test.go index c3f0610..a66bf69 100755 --- a/webhook_test.go +++ b/webhook_test.go @@ -47,7 +47,7 @@ func TestStaticParams(t *testing.T) { ResponseMessage: "success", CaptureCommandOutput: true, PassArgumentsToCommand: []hook.Argument{ - hook.Argument{Source: "string", Name: "passed"}, + {Source: "string", Name: "passed"}, }, }