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-30 22:02:29 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
037acbdb5053f545545ceb1c265f2ff5f42ba49c
037acbdb
1 parent
9b23bdd9
EDIT: Change KeywordMessage altText
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
49 deletions
server/chatbot/message/setKeywordsFlexMessage.js
server/chatbot/message/setKeywordsFlexMessage.js
View file @
037acbd
function
setKeywordsFlexMessage
(
keywords
)
{
let
flexMessage
=
{
type
:
"bubble"
,
body
:
{
type
:
"box"
,
layout
:
"vertical"
,
contents
:
[
{
type
:
"text"
,
text
:
"매무리 봇"
,
weight
:
"bold"
,
color
:
"#1DB446"
,
size
:
"sm"
,
},
{
type
:
"text"
,
text
:
"등록된 키워드"
,
weight
:
"bold"
,
size
:
"xxl"
,
margin
:
"md"
},
{
type
:
"separator"
,
margin
:
"xxl"
},
{
type
:
"box"
,
layout
:
"vertical"
,
contents
:
[],
margin
:
"md"
}
]
let
flexMessage
=
{
type
:
"bubble"
,
body
:
{
type
:
"box"
,
layout
:
"vertical"
,
contents
:
[
{
type
:
"text"
,
text
:
"매무리 봇"
,
weight
:
"bold"
,
color
:
"#1DB446"
,
size
:
"sm"
,
},
};
{
type
:
"text"
,
text
:
"등록된 키워드"
,
weight
:
"bold"
,
size
:
"xxl"
,
margin
:
"md"
,
},
{
type
:
"separator"
,
margin
:
"xxl"
,
},
{
type
:
"box"
,
layout
:
"vertical"
,
contents
:
[],
margin
:
"md"
,
},
],
},
};
for
(
let
i
=
0
;
i
<
keywords
.
length
;
i
++
)
{
const
textbox
=
createKeywordTextBox
(
keywords
[
i
]);
flexMessage
.
body
.
contents
[
3
].
contents
.
push
(
textbox
);
}
for
(
let
i
=
0
;
i
<
keywords
.
length
;
i
++
)
{
const
textbox
=
createKeywordTextBox
(
keywords
[
i
]);
flexMessage
.
body
.
contents
[
3
].
contents
.
push
(
textbox
);
}
return
{
type
:
"flex"
,
altText
:
"키워드 조회 오류
"
,
contents
:
flexMessage
}
return
{
type
:
"flex"
,
altText
:
"매무리 키워드 확인
"
,
contents
:
flexMessage
,
};
}
function
createKeywordTextBox
(
keyword
)
{
return
{
type
:
"text"
,
text
:
keyword
,
size
:
"lg"
,
align
:
"center"
,
margin
:
"md"
}
return
{
type
:
"text"
,
text
:
keyword
,
size
:
"lg"
,
align
:
"center"
,
margin
:
"md"
,
};
}
module
.
exports
=
setKeywordsFlexMessage
;
\ No newline at end of file
module
.
exports
=
setKeywordsFlexMessage
;
...
...
Please
register
or
login
to post a comment