def __init__(self, username, password, region="NA"):
        """Initializes the bot and sets up commands."""

        #XMPP
        self.xmpp                       = sleekxmpp.ClientXMPP(username+"@pvp.net/xiff", "AIR_"+password)

        #Server
        self.server                     = 'chat.%REGION%.lol.riotgames.com'
        self.regions                    = {"BR":"br", "EUN": "eun1",
                                           "EUW": "euw1", "NA": "na2",
                                           "KR": "kr", "OCE": "oc1",
                                           "RU": "ru", "TR": "tr",
                                           "LAN": "la1"}
        self.port                       = 5223
        
        #Account
        self.username                   = username
        self.password                   = password
        self.riot_api_key               = None
        self.region                     = region
        self.recently_added             = []
        self.friends                    = []
        self.friends_online             = [] #TODO: something to do with this
        self.status                     = {}
        self.admins                     = []

        #Commands
        self.help_command               = True
        self.commands                   = {}
        self.command_prefix             = None

        #Misc
        self.summoner_ids_to_name       = {}
        self.logger                     = logging.getLogger(__name__)

        #Custom messages
        self.not_admin_message          = None
        self.someone_added_message      = "Thank you for adding me.\nType help to start"
        self.someone_online_message     = None
        self.invalid_command_message    = None
        self.need_arg_message           = "Invalid usage of %COMMAND%\nPlease use help %COMMAND%"
        self.room_invite_message        = "I'm sorry, I don't join private rooms!"

        #XMPP Events
        self.xmpp.add_event_handler("presence_unsubscribe", self.on_xmpp_presence_unsubscribe)
        self.xmpp.add_event_handler("presence_subscribe", self.on_xmpp_presence_subscribe)
        self.xmpp.add_event_handler("failed_auth", self.on_xmpp_failed_auth)
        self.xmpp.add_event_handler("got_offline", self.on_xmpp_got_offline)
        self.xmpp.add_event_handler("got_online", self.on_xmpp_got_online)
        self.xmpp.add_event_handler("session_start", self.on_xmpp_start)
        self.xmpp.add_event_handler("disconnected", self.on_xmpp_disconnected)
        self.xmpp.add_event_handler("message", self.on_xmpp_message)
        self.xmpp.add_event_handler("roster_update", self.on_xmpp_roster_update, disposable=True)
        self.xmpp.add_event_handler("groupchat_invite", None) #Ends up goign to on_xmpp_message

        #Testing region and registering commands
        if self.regions not in region.upper():
            self.logger.critical("Invalid region.(only " + ", ".join(self.regions.keys())+" are accepted)")
            sys.exit(-1)
        for name, value in inspect.getmembers(self):
            if callable(value) and hasattr(value, "_zxLoLBoT_command"):
                name = value._zxLoLBoT_command_name
                if self.command_prefix:
                    name = self.command_prefix + name
                self.commands[name] = value
                self.logger.debug("Registered bot command: " + name)
dataset/ETHPy150Open Mathzx/zxLoLBoT/zxlolbot.py/zxLoLBoT.__init__/swapped operands of `not in`