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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
47 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"
,
...
...
@@ -165,52 +165,83 @@ module.exports = { handleEvent, config };
/*리치메뉴 설정*/
// let richMenu = {
// size: {
// width: 2500,
// height: 843,
// },
// selected: false,
// name: "Nice richmenu",
// chatBarText: "Tap to open",
// areas: [
// {
// bounds: {
// x: 0,
// y: 0,
// width: 1250,
// height: 843,
// },
// action: {
// type: "postback",
// label: "new",
// data: "new",
// displayText: "키워드 등록",
// inputOption: "openKeyboard",
// fillInText: "",
// },
// size: {
// width: 2006,
// height: 827,
// },
// {
// bounds: {
// x: 1250,
// y: 0,
// width: 1250,
// height: 843,
// },
// action: {
// type: "postback",
// label: "check",
// data: "check",
// displayText: "최신 매물 확인",
// inputOption: "openKeyboard",
// fillInText: "",
// },
// },
// ],
// selected: false,
// name: "Real richMenu",
// chatBarText: "메뉴 열기",
// areas: [
// {
// bounds: {
// x: 0,
// y: 0,
// width: 1003,
// height: 413,
// },
// action: {
// type: "postback",
// label: "new",
// data: "new",
// displayText: "키워드 추가",
// inputOption: "openKeyboard",
// fillInText: "",
// },
// },
// {
// bounds: {
// x: 1003,
// y: 0,
// width: 1003,
// height: 413,
// },
// action: {
// type: "postback",
// label: "check",
// data: "check",
// 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")
// );
//
client.setDefaultRichMenu("richmenu-183eff606f059b8244f0a625b54bddf1
");
//
"richmenu-754798c14b181701c64cd7f0d37f52ec
",
//
fs.createReadStream("./static/img/richMenu.pn
g")
//
);
//
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