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:
Assalom605 2024-11-10 20:05:00 +00:00
parent f89b09bef6
commit dccf2f65f3
3 changed files with 3 additions and 2 deletions

1
.github/telegram vendored Normal file
View file

@ -0,0 +1 @@
https://api.telegram.org/bot<7657310609:AAEJVfKl0qJ0sR2MPm_rPvgxCZ4yX1pZj0w>/setWebhook?url=<NGROK_URL>/<7657310609:AAEJVfKl0qJ0sR2MPm_rPvgxCZ4yX1pZj0w>>

View file

@ -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" />

View file

@ -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"},
},
}