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

            if answer == '42':
                text = Text('맞았습니다!')
            else:
                text = Text('틀렸습니다!')
            return text + chatter.home()
示例#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': '안녕!'}
示例#3
0
def cancel(data):
    message = '취소하셨습니다.'
    return Text(message) + chatter.home()
示例#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
示例#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
示例#6
0
def intro(data):
    message = '안녕하세요! 무엇을 도와드릴까요?'
    buttons = ['오늘의 날씨', '취소']
    return Text(message) + Keyboard(buttons)
示例#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)
示例#8
0
def cancel(data):
    message = '취소하셨습니다.'
    return Text(message) + home_keyboard()
示例#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
示例#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
示例#11
0
def intro(data):
    message = '안녕하세요 소프트웨어융합대학입니다.',
    message = '029104790'
    return Text(message) + chatter.home()
示例#12
0
 def guess(data):
     message = '숫자 맞추기를 시작합니다.'
     return Text(message) + Keyboard(type='text')
示例#13
0
 def try_again(data):
     text = Text('틀렸습니다.')
     keyboard = Keyboard(type='text')
     return text + keyboard
示例#14
0
 def correct(data):
     text = Text('맞았습니다!')
     return text + chatter.home()