def METHOD_NAME(self, team_name: str) -> Optional[str]:
    if not self.is_admin:
        logging.error("You are using a non-admin bot account, which means you need to configure 'team_id'.")
        return
    endpoint = "teams/search"
    url = self._get_full_mattermost_url(endpoint)
    response = self._send_mattermost_request(url, HttpMethod.POST, json={"term": team_name})
    if check_response_succeed(response):
        response = response.json()
        if not len(response):
            logging.warning("No team found, all channels will be searched")
            return None
        return response[0].get("id")
    else:
        logging.warning("There was an error finding a team, all channels will be searched")