asafespace/logic.py
def broadcast_sticker(bot, file_id, recipients, skip):
    """
    Broadcasts only stickers messages to everyone

    Parameters
    ----------
    bot: a Telegram bot object
    file_id: str
        Sticker to send, pass a file_id as String to send a file that exists on the Telegram servers
    recipients: list
        List of all chat_id
    """
    
    for chat_id in recipients:
        if chat_id == skip:
            continue
        try:
            bot.send_sticker(chat_id=chat_id, sticker=file_id)
        except Exception as error:
            logger.error("Sticker could not be sent to user with chat_id " + str(chat_id) + ". " + str(error))
    logger.info("Sticker has been sent to all users")

    Broadcasts only stickers messages to everyone

    Parameters
    ----------
    bot: a Telegram bot object
    file_id: str
        Sticker to send, pass a file_id as String to send a file that exists on the Telegram servers
    recipients: list
        List of all chat_id
    
Broadcasts only stickers messages to everyone
Parameters

a Telegram bot object
file_id: str
Sticker to send, pass a file_id as String to send a file that exists on the Telegram servers
recipients: list
List of all chat_id
Broadcasts only stickers messages to everyone Parameters a Telegram bot object file_id : str Sticker to send pass a file_id as String to send a file that exists on the Telegram servers recipients : list List of all chat_id
def broadcast_sticker(bot, file_id, recipients, skip):
    for chat_id in recipients:
        if chat_id == skip:
            continue
        try:
            bot.send_sticker(chat_id=chat_id, sticker=file_id)
        except Exception as error:
            logger.error("Sticker could not be sent to user with chat_id " + str(chat_id) + ". " + str(error))
    logger.info("Sticker has been sent to all users")
def broadcast_sticker ( bot , file_id , recipients , skip ) : for chat_id in recipients : if chat_id == skip : continue try : bot . send_sticker ( chat_id = chat_id , sticker = file_id ) except Exception as error : logger . error ( "Sticker could not be sent to user with chat_id " + str ( chat_id ) + ". " + str ( error ) ) logger . info ( "Sticker has been sent to all users" )
Broadcasts only stickers messages to everyone
Parameters
Broadcasts only stickers messages to everyone Parameters
"""
    Broadcasts only stickers messages to everyone

    Parameters
    ----------
    bot: a Telegram bot object
    file_id: str
        Sticker to send, pass a file_id as String to send a file that exists on the Telegram servers
    recipients: list
        List of all chat_id
    """
bot
file_id
recipients
skip