i-pu / ipu-room

⚠ [Pausing] Developping Social-Room-Service for studying
3 stars 1 forks source link

Comment Hooks #5

Closed wakame-tech closed 5 years ago

wakame-tech commented 5 years ago

Overview

want to provide comment hook API and Command in a room.

Comment Hook API Example

def on_comment(comment, room, game):
    if comment.text[0] != game.history[:-1].word[:-1]:
        game.continue("NG")
    if comment.text[:-1] == 'ん':
        game.end()