def handle_stickers(message): if message.chat.type == 'private': botFunctions.privateSticker(bot, message) return botFunctions.checkGroupStatus(bot, message) botFunctions.autoAddDetails(message, bot, types) botFunctions.deleteMessageAccordingToPermission(bot, message, 'stickerPermission', 'Stickers') if message.reply_to_message is not None and message.reply_to_message.from_user.id != botID: botFunctions.replyToSticker(bot, message, types)
def handle_contact(message): if message.chat.type == 'private': botFunctions.privateContact(bot, message) return botFunctions.checkGroupStatus(bot, message) botFunctions.autoAddDetails(message, bot, types) botFunctions.deleteMessageAccordingToPermission(bot, message, 'contactPermission', 'Contact') if message.reply_to_message is not None and ( message.reply_to_message.from_user.id != botID): botFunctions.replyToContact(bot, message, types)
def handle_voice(message): if message.chat.type == 'private': botFunctions.privateVoice(bot, message) return botFunctions.checkGroupStatus(bot, message) botFunctions.autoAddDetails(message, bot, types) botFunctions.deleteMessageAccordingToPermission(bot, message, 'voicePermission', 'Voice') if message.reply_to_message is None and message.caption is not None and botFunctions.allCheck( message.caption): botFunctions.mentionAllVoice(bot, message) return botFunctions.mentionOneVoice(bot, message)
def handle_text(message): if message.chat.type == 'private': botFunctions.privateText(bot, message) return botFunctions.checkGroupStatus(bot, message) botFunctions.autoAddDetails(message, bot, types) botFunctions.deleteMessageAccordingToPermission(bot, message, 'textPermission', 'Text') if message.reply_to_message is None and botFunctions.getStatusOfGroupPermission( 'hhhPermission', message.chat.id): botFunctions.hhhFunc(bot, message) if botFunctions.allCheck(message.text): botFunctions.mentionAllText(bot, message) return botFunctions.mentionOneText(bot, message)