mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2026-06-19 07:35:19 +00:00
Refactor Initialization of Persistence Classes (#2604)
This commit is contained in:
committed by
Hinrich Mahler
parent
633b7e7762
commit
be441d56f9
@@ -84,9 +84,7 @@ def handle_invalid_button(update: Update, context: CallbackContext) -> None:
|
||||
def main() -> None:
|
||||
"""Run the bot."""
|
||||
# We use persistence to demonstrate how buttons can still work after the bot was restarted
|
||||
persistence = PicklePersistence(
|
||||
filename='arbitrarycallbackdatabot.pickle', store_callback_data=True
|
||||
)
|
||||
persistence = PicklePersistence(filename='arbitrarycallbackdatabot.pickle')
|
||||
# Create the Updater and pass it your bot's token.
|
||||
updater = Updater("TOKEN", persistence=persistence, arbitrary_callback_data=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user