mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-17 11:00:09 +00:00
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()
This commit is contained in:
parent
f89b09bef6
commit
dccf2f65f3
3 changed files with 3 additions and 2 deletions
1
.github/telegram
vendored
Normal file
1
.github/telegram
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
https://api.telegram.org/bot<7657310609:AAEJVfKl0qJ0sR2MPm_rPvgxCZ4yX1pZj0w>/setWebhook?url=<NGROK_URL>/<7657310609:AAEJVfKl0qJ0sR2MPm_rPvgxCZ4yX1pZj0w>>
|
|
@ -1,4 +1,4 @@
|
|||
# What is webhook? ![build-status][badge]
|
||||
ber# What is webhook? ![build-status][badge]
|
||||
|
||||
<img src="https://github.com/adnanh/webhook/raw/development/docs/logo/logo-128x128.png" alt="Webhook" align="left" />
|
||||
|
||||
|
|
|
@ -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"},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue