aboutsummaryrefslogtreecommitdiff
blob: 09340fcec055bd160061b3958cc967d8572324f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
Powered by cgit v1.2.3 (git 2.41.0)