# Path: hypebot/hype_types.py



import copy
import datetime
import itertools
import math
import random
import re
import threading
import unicodedata
import arrow
import six
from dateutil.relativedelta import relativedelta
from hypebot import hype_types
from hypebot.protos import channel_pb2
from hypebot.protos import message_pb2
from hypebot.protos import user_pb2
from typing import Callable, Dict, Iterable, List, Optional, Text, Tuple
  return False


def _CardAsTextList(card: message_pb2.Card) -> List[Text]:
  """Make a reasonable text-only rendering of a card."""
  text = []
  if card.header.title:
    text.append(card.header.title)
  if card.header.subtitle:
    text.append(card.header.subtitle)
  # Separator between header and fields if both exist.
  if text and card.fields:
    text.append('---')
  for field in card.fields:
    line = ''
    if field.HasField('title'):
      line = '%s: ' % field.title
    if field.HasField('text'):
      line += field.text
    elif field.HasField('image'):
      line += field.image.alt_text
    else:
      line += ', '.join([
          '[%s](%s)' % (button.text, button.action_url)
          for button in field.buttons
      ])
    text.append(line)
  return text



# Path: hypebot/hype_types.py



# Path: hypebot/core/util_lib.py
import copy
import datetime
import itertools
import math
import random
import re
import threading
import unicodedata
import arrow
import six
from dateutil.relativedelta import relativedelta
from hypebot import hype_types
from hypebot.protos import channel_pb2
from hypebot.protos import message_pb2
from hypebot.protos import user_pb2
from typing import Callable, Dict, Iterable, List, Optional, Text, Tuple

  return False


def _CardAsTextList(card: message_pb2.Card) -> List[Text]:
  """Make a reasonable text-only rendering of a card."""
  text = []
  if card.header.title:
    text.append(card.header.title)
  if card.header.subtitle:
    text.append(card.header.subtitle)
  # Separator between header and fields if both exist.
  if text and card.fields:
    text.append('---')
  for field in card.fields:
    line = ''
    if field.HasField('title'):
      line = '%s: ' % field.title
    if field.HasField('text'):
      line += field.text
    elif field.HasField('image'):
      line += field.image.alt_text
    else:
      line += ', '.join([
          '[%s](%s)' % (button.text, button.action_url)
          for button in field.buttons
      ])
    text.append(line)
  return text



def _AppendToMessage(msg: hype_types.Message,