# https://docs.python.org/3/library/configparser.html from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ReplyKeyboardMarkup, KeyboardButton from prompt.string import * from typing import TypedDict import configparser config = configparser.ConfigParser() config.read("config.ini") BOT_TOKEN = config["DEFAULT"]["BOT_TOKEN"] FSQ_API_KEY = config["DEFAULT"]["FOURSQUARE_API_KEY"] TOOT_API_BASE_URL = config["TOOT"]["API_BASE_URL"] TOOT_CLIENT_ID = config["TOOT"]["CLIENT_ID"] TOOT_CLIENT_SECRET = config["TOOT"]["CLIENT_SECRET"] TOOT_ACCESS_TOKEN = config["TOOT"]["ACCESS_TOKEN"] MEDIA_GROUP_TIMEOUT = 3 WAIT_LOCATION, LOCATION_SEARCH_KEYWORD, LOCATION_CONFIRMATION, ADD_MEDIA, ADD_COMMENT = range(5) MAIN_MENU = ReplyKeyboardMarkup([ [KeyboardButton(text="Check-in here", request_location=True)], ]) SKIP_LOCATION_SEARCH = CALLBACK_SKIP INLINE_SKIP_MENU = InlineKeyboardMarkup([ [InlineKeyboardButton("Skip", callback_data=SKIP_LOCATION_SEARCH)] ]) class MsgDict(TypedDict): media_id: str caption: str status_id: int content: str chat_id: int