skip to Main Content

How to create separate files for functions, then import them? – Telegram API

I have this working code: from telegram import Update from telegram.ext import Updater, CommandHandler, CallbackContext updater = Updater('token') def hello(update: Update, context: CallbackContext) -> None: update.message.reply_text('Hello!') updater.dispatcher.add_handler(CommandHandler('hello', hello)) updater.start_polling() updater.idle() I wish to have a separate file for each function…

VIEW QUESTION
Back To Top
Search