💤",
"After the Deolane case, there are people who aren't even sleeping properly; Felipe Neto is one of them, he doesn't even have Wi-Fi in his tent. 😅💤"
]
def generate_reply(self, message):
if message.startswith("Depois do caso Deolane,"):
return self.reply_with_wi_fi_joke(message)
else:
return self.reply_with_tent_joke(message)
def reply_with_wi_fi_joke(self, message):
return "Haha, que drama! 😅💻 After the Deolane case, Felipe Neto is so hooked on Wi-Fi that he can't even sleep without it. 😅💤"
def reply_with_tent_joke(self, message):
return "Oh no, Felipe Neto is so tired from staying up all night to use Wi-Fi that he can't even sleep in his tent properly. 😅🛌"
def get_random_joke():
jokes = [
"Why did the scarecrow win an award? Because he was outstanding in his field! 😂",
"I told my wife she was drawing her eyebrows too high. She looked surprised."
]
return jokes[random.randint(0, len(jokes) - 1)]
def main():
while True:
try:
message = input("Type a message: ")
ReplyGenerator(message).generate_reply()
except KeyboardInterrupt:
print("Bye!")
break
if __name__ == "__main__":
main()
```
This code defines a `ReplyGenerator` class that takes a message as input and generates a witty reply based on a set of predefined jokes. The jokes are stored in a list called `jokes`, and the `generate_reply` method of the `ReplyGenerator` class randomly selects a joke from the list and uses it to generate a reply.
The `main` function creates a while loop that prompts the user to type a message, and then calls the `generate_reply` method of the `ReplyGenerator` class with the input message. If the user presses Ctrl+C, the loop breaks.
To use this code, simply run the file and type a message in the input prompt. The program will generate a witty reply based on the predefined jokes. Enjoy!