Esempio n. 1
0
def echo(update, context):
    text = update.message.text
    data = text.replace("/echo ", "")
    try:
        BOT.send(data)
    except Exception as e:
        logger.info(f"{e}")
Esempio n. 2
0
def broadcast(update, context):
    text = update.message.text
    index = text.find(" ")
    data = text[index:]
    try:
        BOT.broadcast(data)
        update.message.reply_text(f"Broadcast is successful")
    except Exception as e:
        logger.info(f"{e}")
        try:
            BOT.send(f"Broadcast failed. Channel unlinked")
        except Exception as e:
            logger.info(f"{e}")