def add_admin(self, admin):
        """Add an admin to the admins list.
        If the admin is numerical then we assume it's a summoner_id and add it directly to the admin list.
        If the admin has characters we assume it's a summoner_name and we attempt getting the summoner_id using the riot api.
        (Require self.riot_api_key)"""

        admin = str(admin)
        error = False
        if admin not in self.admins:
            if admin.isdigit(): #admin is more than likely a summoner id
                self.admins.append(admin)
            elif self.riot_api_key: #admin is more than likely a summoner name
                summoner_id = self.summoner_name_to_id(admin)
                if summoner_id:
                    self.admins.append(summoner_id)
                    admin += " ("+str(summoner_id)+")"
                else:
                    error = True
                    self.logger.debug(admin + " is not a registered summoner or the riot api is down at the moment.")
            else:
                error = True
                self.logger.warning("An api request has been attempted without an api key.")
        else:
            error = True
            self.logger.warning("Attempted to add an admin that is already an admin.")
        if not error:
            self.logger.debug(admin + " has been added to the admins list.")
dataset/ETHPy150Open Mathzx/zxLoLBoT/zxlolbot.py/zxLoLBoT.add_admin/original