File tree Expand file tree Collapse file tree 1 file changed +36
-8
lines changed Expand file tree Collapse file tree 1 file changed +36
-8
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,42 @@ async def feed(ctx):
50
50
# 'scheme': 'http://www.itunes.com/',
51
51
# 'term': 'Tech News'},
52
52
53
- await story .say (
54
- 'Feed: {} by {}' .format (title , author ),
55
- user = ctx ['user' ]
56
- )
57
-
58
- await story .send_image (
59
- img_url ,
60
- user = ctx ['user' ]
53
+ #
54
+ # Do not yet decided which way is better to reflect feed
55
+ #
56
+ # await story.say(
57
+ # 'Feed: {} by {}'.format(title, author),
58
+ # user=ctx['user']
59
+ # )
60
+ #
61
+ # await story.send_image(
62
+ # img_url,
63
+ # user=ctx['user']
64
+ # )
65
+
66
+ await story .send_template (
67
+ payload = {
68
+ 'template_type' : 'generic' ,
69
+ 'elements' : [
70
+ {
71
+ 'title' : 'Feed: {} by {}' .format (title , author ),
72
+ 'image_url' : img_url ,
73
+ 'subtitle' : summary ,
74
+ # 'default_action': {
75
+ # 'type': 'web_url',
76
+ # 'url': link,
77
+ # },
78
+ 'buttons' : [
79
+ {
80
+ 'type' : 'web_url' ,
81
+ 'url' : link ,
82
+ 'title' : 'Website'
83
+ }
84
+ ]
85
+ }
86
+ ]
87
+ },
88
+ user = ctx ['user' ],
61
89
)
62
90
63
91
for entry in d .entries :
You can’t perform that action at this time.
0 commit comments