I gave a "friend" my number and he sent the effective power code and now my iMessage doesn't work anymore I click on the app for iMessage and the app crashes
Here's a few things to do for a fix:
If you receive one of these messages, there are a few possible fixes that have worked for us and for other people who have encountered the bug. If the Messages app was opened to the conversation with the person who sent the offending message, the Messages app can be reopened to this conversation. Sending a reply message fixes the problem.
If Messages was opened to the conversation list view, the app will crash when you attempt to open it. You can fix this by having someone send you a message or by sending a message to yourself. There are several options for sending a message to yourself, including sending yourself a message via Siri or through the Share sheet in any app.
To send yourself a message in Siri, tell Siri to "Send a message to myself." Siri will open up a dialogue where you can give her a quick message like "Fix" that'll be sent to your iPhone to clear away the malicious message.
Alternatively, you can open an app like Notes, craft a quick note, and use the Share option (the little document with an arrow) to message it to yourself. Sending yourself something though the share sheet of an app opens a new messages window where you can enter your own contact information.