diff --git a/mojo-rtm/mojo-rtm.py b/mojo-rtm/mojo-rtm.py index baf78cc..bb7eb6b 100644 --- a/mojo-rtm/mojo-rtm.py +++ b/mojo-rtm/mojo-rtm.py @@ -24,15 +24,16 @@ def zalgo_ify(text): ''' Takes some normal text and zalgo-ifies it ''' # "Combining Diacritical Marks" Unicode block. combining_chars = [chr(n) for n in range(768, 878)] - + zalgo_text = '' - + for char in text: combining_char = random.choice(combining_chars) zalgo_text += f'{char}{combining_char}' - + return zalgo_text + def reactable_string(text): """ Return regex objects matching interesting strings @@ -51,7 +52,6 @@ def reactable_string(text): return reactable_array -<<<<<<< HEAD def react_to_message(reaction, payload, channel_id, thread_ts): payload['web_client'].reactions_add( channel=channel_id, @@ -62,8 +62,6 @@ def react_to_message(reaction, payload, channel_id, thread_ts): return None -======= ->>>>>>> eef1cb68f5cc4f6b799fa5919ad1420590e74b96 @slack.RTMClient.run_on(event='message') def handle_messages(**payload): """ @@ -78,16 +76,6 @@ def handle_messages(**payload): if reactable_string(data['text']): reactions_needed = reactable_string(data['text']) -<<<<<<< HEAD -======= - def react_to_message(reaction): - payload['web_client'].reactions_add( - channel=channel_id, - name=reaction, - timestamp=thread_ts - ) - ->>>>>>> eef1cb68f5cc4f6b799fa5919ad1420590e74b96 if 'ai' in reactions_needed: react_to_message("robot_face", payload, channel_id, thread_ts) if 'furry' in reactions_needed: