def flip(text, reply, message, chan): """<text> - Flips <text> over.""" if USE_FLIPPERS: if text in ['table', 'tables']: message(random.choice([random.choice(flippers) + " ︵ " + "\u253B\u2501\u253B", table_flipper])) table_status[chan] = True elif text == "5318008": out = "BOOBIES" message(random.choice(flippers) + " ︵ " + out) elif text == "BOOBIES": out = "5318008" message(random.choice(flippers) + " ︵ " + out) else: message(random.choice(flippers) + " ︵ " + formatting.multi_replace(text[::-1], replacements)) else: reply(formatting.multi_replace(text[::-1], replacements))
def table(text, message): """<text> -- (╯°□°)╯︵ <ʇxǝʇ>""" if text: message( random.choice(flippers) + " ︵ " + formatting.multi_replace(text[::-1].lower(), replacements)) else: message(random.choice(flippers) + " ︵ ┻━┻")
def test_multiword_replace(): assert multi_replace( test_multiword_replace_text, test_multiword_replace_dict) == test_multiword_replace_result # compatibility assert multiword_replace( test_multiword_replace_text, test_multiword_replace_dict) == test_multiword_replace_result
def flip(text, reply, message, chan): """<text> -- Flips <text> over.""" global table_status #table_status = defaultdict(False) if USE_FLIPPERS: if text in ['table','tables']: message(random.choice([random.choice(flippers) + " ︵ " + "\u253B\u2501\u253B", table_flipper])) table_status[chan] = True elif text == "5318008": out = "BOOBIES" message(random.choice(flippers) + " ︵ " + out) elif text == "BOOBIES": out = "5318008" message(random.choice(flippers) + " ︵ " + out) else: message(random.choice(flippers) + " ︵ " + formatting.multi_replace(text[::-1], replacements)) else: reply(formatting.multi_replace(text[::-1], replacements))
def table(text, message): """<text> -- (╯°□°)╯︵ <ʇxǝʇ>""" if text: message(random.choice(flippers) + " ︵ " + formatting.multi_replace(text[::-1].lower(), replacements)) else: message(random.choice(flippers) + " ︵ ┻━┻")
def flip(text, reply): """<text> -- Flips <text> over.""" reply(formatting.multi_replace(text[::-1].lower(), replacements))
def test_multiword_replace(): assert multi_replace(test_multiword_replace_text, test_multiword_replace_dict) == test_multiword_replace_result # compatibility assert multiword_replace(test_multiword_replace_text, test_multiword_replace_dict) == test_multiword_replace_result