Refactor Initialization of Persistence Classes (#2604)

This commit is contained in:
Bibo-Joshi
2021-08-13 16:18:42 +02:00
committed by Hinrich Mahler
parent 633b7e7762
commit be441d56f9
12 changed files with 125 additions and 216 deletions
+1 -3
View File
@@ -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)