示例#1
0
def post_redpill(bot: BOT, message: Message):
    if re.match("(?i)(post|get|send) (redpill|meme|maymay)", message.text):
        image = random.choice(d['redpill_file_ids']['photo'])
        BOT.send_photo(chat_id=message.chat.id,
                       photo=image,
                       disable_notification=True)
        if message.from_user.is_self:
            message.delete()
示例#2
0
def post_swift(bot: BOT, message: Message):
    if re.match("(?i)(post|get|send) (tay|taytay|taylor|tswift|swift|trap)",
                message.text):
        image = random.choice(d['swift_file_ids']['photo'])
        BOT.send_photo(chat_id=message.chat.id,
                       photo=image,
                       disable_notification=True)
        if message.from_user.is_self:
            message.delete()
示例#3
0
def post_911(bot: BOT, message: Message):
    if re.match(
            "(?i)((post|get|send) (911|bush|twin towers|wtc)|bush did (911|9/11))",
            message.text):
        image = random.choice(d['911_file_ids']['photo'])
        BOT.send_photo(chat_id=message.chat.id,
                       photo=image,
                       disable_notification=True)
        if message.from_user.is_self:
            message.delete()
示例#4
0
def post_sminem(bot: BOT, message: Message):
    if re.match(
            "(?i)(post|get|send) (sminem|smnem|smn|big ear (kid|guy)|chromosome)",
            message.text):
        image = random.choice(d['sminem_file_ids']['photo'])
        BOT.send_photo(chat_id=message.chat.id,
                       photo=image,
                       disable_notification=True)
        if message.from_user.is_self:
            message.delete()
示例#5
0
def post_watson(bot: BOT, message: Message):
    if re.match(
            "(?i)(post|get|send) (w***e|s**t|watson|emma|hermione|granger|harry potter girl)",
            message.text):
        image = random.choice(d['emma_file_ids']['photo'])
        BOT.send_photo(chat_id=message.chat.id,
                       photo=image,
                       disable_notification=True)
        if message.from_user.is_self:
            message.delete()
示例#6
0
def send_dog_gif(bot: BOT, message: Message):
    if re.match("(?i)(post|get|send) (dog|doggo|woof|🐶|🐕)", message.text):
        if randint(0, 1) == 1:
            link_to_image = get_dog("webm,mp4")
        else:
            link_to_image = get_doggo()
        BOT.send_photo(
            chat_id=message.chat.id, photo=link_to_image, disable_notification=True
        )
        if message.from_user.is_self:
            message.delete()
示例#7
0
def post_trump(bot: BOT, message: Message):
    if re.match("(?i)(post|get|send) (drumpf|trump|orange man)", message.text):
        image = random.choice(d['drump_file_ids']['photo'])
        BOT.send_photo(
            chat_id=message.chat.id,
            photo=image,
            disable_notification=True,
            caption=drumpf_quote(),
        )
        if message.from_user.is_self:
            message.delete()
示例#8
0
def post_rose(bot: BOT, message: Message):
    if re.match(
            "(?i)(post|get|send) (rose|indigo girl|blue girl|love|roze|crush|🌹)",
            message.text):
        image = random.choice(d['rose_file_ids']['photo'])
        BOT.send_photo(chat_id=message.chat.id,
                       photo=image,
                       disable_notification=True,
                       reply_to_message_id=ReplyCheck(message))
        if message.from_user.is_self:
            message.delete()
示例#9
0
def post_kot(bot: BOT, message: Message):
    if re.match("(?i)(post|get|send) (kot|kots|cat|cats|🐱|🐈|😸|🐱)",
                message.text):
        kot_link = get_kot(mime_types="jpg,png")
        BOT.send_photo(
            chat_id=message.chat.id,
            photo=kot_link,
            reply_to_message_id=ReplyCheck(message),
            disable_notification=True,
        )
        if message.from_user.is_self:
            message.delete()
示例#10
0
def post_oadb(bot: BOT, message: Message):
    message_text = message.text.replace("!oadb ", "")
    data = oadb(message_text)
    BOT.send_message(
        chat_id=message.chat_id,
        text=data[0],
        disable_notification=True,
        reply_to_message_id=ReplyCheck(message),
    )

    BOT.send_photo(chat_id=message.chat.id,
                   photo=data[1],
                   disable_notification=True)
    if message.from_user.is_self:
        message.delete()
示例#11
0
def greet_new_users(bot: BOT, message: Message):
    new = message.new_chat_members
    for user in new:
        if arabian.search(user.first_name):
            BOT.kick_chat_member(chat_id=message.chat.id,
                                 user_id=message.reply_to_message.from_user.id,
                                 until_date=0)
            BOT.send_message(
                message.chat.id,
                "arabian characters detected in name, user kicked from the chat"
            )
        else:
            BOT.send_photo(nfc,
                           "AgADBAAD0bExG9D-CVDg8aFwJMFwJ3gC",
                           reply_to_message_id=message.message_id)
示例#12
0
def post_gentoo(bot: BOT, message: Message):
    if re.match("(?i)(post|install|get|send) (gentoo|linux)", message.text):
        if random.randint(1, 4) == 1:
            image = random.choice(d['gentoo_file_ids']['gif'])
            BOT.send_animation(
                chat_id=message.chat.id,
                animation=image,
                disable_notification=True,
                reply_to_message_id=ReplyCheck(message),
            )
        else:
            image = random.choice(d['gentoo_file_ids']['photo'])
            BOT.send_photo(
                chat_id=message.chat.id,
                photo=image,
                disable_notification=True,
                reply_to_message_id=ReplyCheck(message),
            )
示例#13
0
def post_merchant(bot: BOT, message: Message):
    if re.match("(?i)(post|get|send) (merchant|jew|rabbi)", message.text):
        if random.randint(1, 4) == 1:
            image = random.choice(d['merchant_file_ids']['gif'])
            BOT.send_animation(
                chat_id=message.chat.id,
                animation=image,
                disable_notification=True,
                reply_to_message_id=ReplyCheck(message),
            )
        else:
            image = random.choice(d['merchant_file_ids']['photo'])
            BOT.send_photo(
                chat_id=message.chat.id,
                photo=image,
                disable_notification=True,
                reply_to_message_id=ReplyCheck(message),
            )
        if message.from_user.is_self:
            message.delete()
示例#14
0
def post_brexit(bot: BOT, message: Message):
    image = random.choice(d['farage_file_ids']['photo'])
    BOT.send_photo(chat_id=message.chat.id,
                   photo=image,
                   disable_notification=True)