blob: 09340fcec055bd160061b3958cc967d8572324f1 (
plain) (
tree)
|
|
from telegram import Update
from telegram.constants import ParseMode
from telegram.ext import ContextTypes, ConversationHandler
from config import *
async def start_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:
hello = "Hello, this is `checkin.bot`. \n\n" \
"This is a Telegram bot with functionality similar to Foursquare Swarm, " \
"but check in and post your location to the Fediverse (Mastodon/Pleroma) instead of Twitter.\n\n" \
"Aware of privacy concerns, this bot will not store your location data." \
"*Be safe and cautious when sharing your real time location on the web.* \n\n" \
"Start using this bot by sharing your location using Telegram context menu to it."
await update.message.reply_text(hello, parse_mode=ParseMode.MARKDOWN)
await update.message.reply_text(PROMPT_CHOOSE_ACTION, reply_markup=MAIN_MENU)
return WAIT_LOCATION
async def help_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
await update.message.reply_text(PROMPT_HELP)
async def cancel_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:
await update.message.reply_text(text=PROMPT_CANCELED, reply_markup=MAIN_MENU)
return ConversationHandler.END
|