"""CactusBot!"""

import logging

import time

__version__ = "v0.4-dev"


# TODO: change to new logo
CACTUS_ART = r"""CactusBot initialized!

      ,`""',
      ;' ` ;
      ;`,',;
      ;' ` ;
 ,,,  ;`,',;               _____           _
;,` ; ;' ` ;   ,',        / ____|         | |
;`,'; ;`,',;  ;,' ;      | |     __ _  ___| |_ _   _ ___
;',`; ;` ' ; ;`'`';      | |    / _` |/ __| __| | | / __|
;` '',''` `,',`',;       | |___| (_| | (__| |_| |_| \__ \
 `''`'; ', ;`'`'          \_____\__,_|\___|\__|\__,_|___/
      ;' `';
      ;` ' ;
      ;' `';
      ;` ' ;
      ; ',';
      ;,' ';  {version}

Made by: 2Cubed, Innectic, and ParadigmShift3d
""".format(version=__version__)


class Cactus:
    """Run CactusBot safely."""

    def __init__(self, service, *, debug="INFO"):
        super().__init__()

        self.logger = logging.getLogger(__name__)

        self.service = service

        self.debug = debug  # XXX: find purpose or remove

    async def run(self, username, password):
        """Run bot."""

        self.logger.info(CACTUS_ART)

        # TODO: Add support for multiple services
        try:
            await self.service.run(username, password)

        except KeyboardInterrupt:
            self.logger.info("Removing thorns... done.")

        except Exception:
            self.logger.critical("Oh no, I crashed!", exc_info=True)

            self.logger.info("Restarting in 10 seconds...")

            try:
                time.sleep(10)
            except KeyboardInterrupt:
                self.logger.info("CactusBot deactivated.")

@@ -71,35 +71,8 @@
 %22%0A%0A%0A
-# TODO: change to new logo%0A
 CACT
@@ -118,454 +118,283 @@
     
-,%60%22%22',%0A      ;'
+   --%60%0A  
  %60 
-;%0A
     
-  ;%60,',;%0A      ;' %60 ;%0A ,,,  ;%60,',;               _____           _%0A;,%60 ; ;' %60 ;   ,',        / ____%7C         %7C %7C%0A;%60,'; ;%60,',;  ;,' ;      %7C %7C     __ _  ___%7C %7C_ _   _ ___%0A;',%60; ;%60 ' ; ;%60'%60';      %7C %7C    / _%60 %7C/ __%7C __%7C %7C %7C / __%7C%0A;%60 '',''%60 %60,',%60',;       %7C %7C___%7C (_%7C %7C (__%7C %7C_%7C %7C_%7C %5C__ %5C%0A %60''%60'; ', ;%60'%60'          %5C_____%5C__,_%7C%5C___%7C%5C__%7C%5C__,_%7C___/%0A      ;' %60';%0A      ;%60 ' ;%0A      ;' %60';%0A      ;%60 ' ;%0A      ; ',';%0A      ;,' '; 
+/++/- %60%0A   o+:.  :+osy -/:.%60%0A   oo+o/ /osyy -+///%60%0A   /shh+ +oo+/ ./ooo%60%0A   //+o+ /+osy /soo+%60%0A   ++//- :oyhy /hyo+%60%0A   /+oo/ /+/// -+/++%60%0A    .:+/ ://++ :+///%60%0A         :+ooo :oo+-%0A         +o++/ --%60%0A         +o+oo%0A         -ohhy%0A           %60:+     CactusBot
  %7Bve

Update logo