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

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