File tree Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Original file line number Diff line number Diff line change 3
3
4
4
THUMBNAIL_URL = 'https://via.placeholder.com/1024x1024'
5
5
HORIZONTAL_THUMBNAIL_URL = 'https://via.placeholder.com/1024x768'
6
+ QUICK_REPLY_ICON_URL = 'https://via.placeholder.com/64x64'
6
7
7
8
def client
8
9
@client ||= Line ::Bot ::Client . new do |config |
@@ -363,6 +364,77 @@ def handle_message(event)
363
364
}
364
365
} )
365
366
367
+ when 'quickreply'
368
+ reply_content ( event , {
369
+ type : 'text' ,
370
+ text : '[QUICK REPLY]' ,
371
+ quickReply : {
372
+ items : [
373
+ {
374
+ type : "action" ,
375
+ imageUrl : QUICK_REPLY_ICON_URL ,
376
+ action : {
377
+ type : "message" ,
378
+ label : "Sushi" ,
379
+ text : "Sushi"
380
+ }
381
+ } ,
382
+ {
383
+ type : "action" ,
384
+ action : {
385
+ type : "location" ,
386
+ label : "Send location"
387
+ }
388
+ } ,
389
+ {
390
+ type : "action" ,
391
+ imageUrl : QUICK_REPLY_ICON_URL ,
392
+ action : {
393
+ type : "camera" ,
394
+ label : "Open camera" ,
395
+ }
396
+ } ,
397
+ {
398
+ type : "action" ,
399
+ imageUrl : QUICK_REPLY_ICON_URL ,
400
+ action : {
401
+ type : "cameraRoll" ,
402
+ label : "Open cameraRoll" ,
403
+ }
404
+ } ,
405
+ {
406
+ type : "action" ,
407
+ action : {
408
+ type : "postback" ,
409
+ label : "buy" ,
410
+ data : "action=buy&itemid=111" ,
411
+ text : "buy" ,
412
+ }
413
+ } ,
414
+ {
415
+ type : "action" ,
416
+ action : {
417
+ type : "message" ,
418
+ label : "Yes" ,
419
+ text : "Yes"
420
+ }
421
+ } ,
422
+ {
423
+ type : "action" ,
424
+ action : {
425
+ type : "datetimepicker" ,
426
+ label : "Select date" ,
427
+ data : "storeId=12345" ,
428
+ mode : "datetime" ,
429
+ initial : "2017-12-25t00:00" ,
430
+ max : "2018-01-24t23:59" ,
431
+ min : "2017-12-25t00:00"
432
+ }
433
+ } ,
434
+ ] ,
435
+ } ,
436
+ } )
437
+
366
438
when 'bye'
367
439
case event [ 'source' ] [ 'type' ]
368
440
when 'user'
You can’t perform that action at this time.
0 commit comments