Toggle navigation
Toggle navigation
This project
Loading...
Sign in
유명현
/
mamuri-bot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
윤준석
2022-05-25 23:41:55 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f02c82c5a463976deae60d095dc0916535a7c1ae
f02c82c5
1 parent
ba5ff58c
FIX: rich menu and set default
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
17 deletions
server/chatbot/index.js
server/static/image/richMenu.png
server/static/img/richMenu.jpg → server/static/image/richMenu_test.jpg
server/chatbot/index.js
View file @
f02c82c
...
...
@@ -69,7 +69,7 @@ function handleEvent(event) {
})
);
}
}
else
if
(
event
.
postback
.
data
==
"check"
)
{
}
else
if
(
event
.
postback
.
data
==
"check
Items
"
)
{
return
Promise
.
resolve
(
client
.
replyMessage
(
event
.
replyToken
,
{
type
:
"flex"
,
...
...
@@ -166,51 +166,82 @@ module.exports = { handleEvent, config };
/*리치메뉴 설정*/
// let richMenu = {
// size: {
//
width: 2500
,
//
height: 843
,
//
width: 2006
,
//
height: 827
,
// },
// selected: false,
//
name: "Nice richm
enu",
//
chatBarText: "Tap to open
",
//
name: "Real richM
enu",
//
chatBarText: "메뉴 열기
",
// areas: [
// {
// bounds: {
// x: 0,
// y: 0,
//
width: 1250
,
//
height: 84
3,
//
width: 1003
,
//
height: 41
3,
// },
// action: {
// type: "postback",
// label: "new",
// data: "new",
//
displayText: "키워드 등록
",
//
displayText: "키워드 추가
",
// inputOption: "openKeyboard",
// fillInText: "",
// },
// },
// {
// bounds: {
//
x: 1250
,
//
x: 1003
,
// y: 0,
//
width: 1250
,
//
height: 84
3,
//
width: 1003
,
//
height: 41
3,
// },
// action: {
// type: "postback",
// label: "check",
// data: "check",
//
displayText: "최신 매물 확인
",
//
displayText: "키워드 삭제
",
// inputOption: "openKeyboard",
// fillInText: "",
// },
// },
// {
// bounds: {
// x: 0,
// y: 413,
// width: 1003,
// height: 414,
// },
// action: {
// type: "postback",
// label: "checkKeyword",
// data: "checkKeyword",
// displayText: "키워드 확인",
// },
// },
// {
// bounds: {
// x: 1003,
// y: 413,
// width: 1003,
// height: 414,
// },
// action: {
// type: "postback",
// label: "checkItems",
// data: "checkItems",
// displayText: "매물 즉시 검색",
// },
// },
// ],
// };
//// 등록
// client.createRichMenu(richMenu).then((richMenuId) => console.log(richMenuId));
// 등록
// client.createRichMenu(richMenu).then((richMenuId) => {
// console.log(richMenuId)
// });
// client.setRichMenuImage(
//
"richmenu-183eff606f059b8244f0a625b54bddf1
",
//
fs.createReadStream("./static/img/richMenu.jp
g")
//
"richmenu-754798c14b181701c64cd7f0d37f52ec
",
//
fs.createReadStream("./static/img/richMenu.pn
g")
// );
//
client.setDefaultRichMenu("richmenu-183eff606f059b8244f0a625b54bddf1
");
//
client.setDefaultRichMenu("richmenu-754798c14b181701c64cd7f0d37f52ec
");
...
...
server/static/image/richMenu.png
0 → 100644
View file @
f02c82c
117 KB
server/static/im
g/richMenu
.jpg
→
server/static/im
age/richMenu_test
.jpg
View file @
f02c82c
114 KB
Please
register
or
login
to post a comment