Beispiel #1
0
        def decide(data):
            answer = data['content']

            if answer == '42':
                text = Text('맞았습니다!')
            else:
                text = Text('틀렸습니다!')
            return text + chatter.home()
Beispiel #2
0
    def test_text(self, message):
        text = Text('안녕!')
        assert isinstance(text, Text)
        assert message.dict.text == text

        assert text.text == '안녕!'
        assert text.message == {'text': '안녕!'}
Beispiel #3
0
def cancel(data):
    message = '취소하셨습니다.'
    return Text(message) + chatter.home()
Beispiel #4
0
def web(data):
    text = Text('자세한 정보를 보고싶으면 사이트로 이동해주세요!')
    msg_button = MessageButton(label='이동하기',
                               url='https://github.com/jungwinter/chatterbox')
    keyboard = chatter.home()
    return Message(text=text, message_button=msg_button) + keyboard
Beispiel #5
0
def weather(data):
    text = Text('오늘은 하루종일 맑겠습니다.')
    sunny_image_url = 'https://www.python.org/static/img/python-logo.png'
    photo = Photo(url=sunny_image_url, width=600, height=401)
    keyboard = chatter.home()
    return text + photo + keyboard
Beispiel #6
0
def intro(data):
    message = '안녕하세요! 무엇을 도와드릴까요?'
    buttons = ['오늘의 날씨', '취소']
    return Text(message) + Keyboard(buttons)
Beispiel #7
0
 class Data:
     text = Text('안녕!')
     photo = Photo('https://photo.src', 640, 480)
     button = MessageButton('안녕!', 'https://button/url')
     full = Message(text=text, photo=photo, message_button=button)
Beispiel #8
0
def cancel(data):
    message = '취소하셨습니다.'
    return Text(message) + home_keyboard()
Beispiel #9
0
def weather(data):
    text = Text('오늘은 하루종일 맑겠습니다.')
    sunny_image_url = 'http://images/test.jpg'
    photo = Photo(url=sunny_image_url, width=600, height=401)
    keyboard = home_keyboard()
    return text + photo + keyboard
Beispiel #10
0
def web(data):
    text = Text('자세한 정보를 보고싶으면 사이트로 이동해주세요!')
    msg_button = MessageButton(label='이동하기',
                               url='https://cs.kookmin.ac.kr')
    keyboard = chatter.home()
    return text + msg_button + keyboard
Beispiel #11
0
def intro(data):
    message = '안녕하세요 소프트웨어융합대학입니다.',
    message = '029104790'
    return Text(message) + chatter.home()
Beispiel #12
0
 def guess(data):
     message = '숫자 맞추기를 시작합니다.'
     return Text(message) + Keyboard(type='text')
Beispiel #13
0
 def try_again(data):
     text = Text('틀렸습니다.')
     keyboard = Keyboard(type='text')
     return text + keyboard
Beispiel #14
0
 def correct(data):
     text = Text('맞았습니다!')
     return text + chatter.home()