from colorama import Fore
import requests


def main(self):
    try:
        req = requests.get("https://api.chucknorris.io/jokes/random")
        chuck_json = req.json()

        chuck_fact = chuck_json["value"]
        if self.enable_voice:
            print(Fore.RED + chuck_fact + Fore.RESET)
            self.speech.text_to_speech(chuck_fact)
        else:
            print(Fore.RED + chuck_fact + Fore.RESET)
    except:
        if self.enable_voice:
            self.speech.text_to_speech(
                "Looks like Chuck broke the Internet.")
        else:
            print(
                Fore.RED +
                "Looks like Chuck broke the Internet..." + Fore.RESET)

@@ -19,16 +19,65 @@
 rt Fore%0A
+from utilities.GeneralUtilities import print_say%0A
 import r
@@ -267,468 +267,130 @@
     
-if self.enable_voice:%0A            print(Fore.RED + chuck_fact + Fore.RESET)%0A            self.speech.text_to_speech(chuck_fact)%0A        else:%0A            print(Fore.RED + chuck_fact + Fore.RESET)%0A    except:%0A        if self.enable_voice:%0A            self.speech.text_to_speech(%0A                %22Looks like Chuck broke the Internet.%22)%0A        else:%0A            print(%0A                Fore.RED +%0A                %22Looks like Chuck broke the Internet...%22 + Fore.RESET
+print_say(chuck_fact, self, Fore.RED)%0A    except:%0A        print_say(%22Looks like Chuck broke the Internet...%22, self, Fore.RED
 )%0A

refactor chuck facts