def RECEIVE_MESSAGE(op):
msg = op.message<EOL>text = msg.text<EOL>msg_id = msg.id<EOL>receiver = msg.to<EOL>sender = msg._from<EOL>try:<EOL><INDENT>if msg.contentType == <NUM_LIT:0>:<EOL><INDENT>if msg.toType == <NUM_LIT:2>:<EOL><INDENT>line.sendChatChecked(receiver, msg_id)<EOL>contact = line.getContact(sender)<EOL>if text.lower() == '<STR_LIT>':<EOL><INDENT>line.log('<STR_LIT>' % (contact.displayName, text))<EOL>line.sendMessage(receiver, '<STR_LIT>')<EOL><DEDENT>elif text.lower() == '<STR_LIT>':<EOL><INDENT>line.log('<STR_LIT>' % (contact.displayName, text))<EOL>line.sendMessage(receiver, '<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>line.log("<STR_LIT>" + str(e))<EOL><DEDENT>
This is sample for implement BOT in LINE group
Invite your BOT to group, then BOT will auto accept your invitation
Command availabe :
> hi
> /author