Skip to content

Commit

Permalink
kalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NoirStar committed Mar 21, 2020
1 parent 03a0ac9 commit 553b8c2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 33 deletions.
32 changes: 32 additions & 0 deletions kalink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
exports.test =
{
"link_ver": "4.0",
"template_object":
{
"object_type": "feed",
"button_title": "버튼",

"content": {
"title": "제목",
"image_url": "http://k.kakaocdn.net/dn/dEwroC/btqgdYG36hU/1zQbPe8ZLpGGmoMkrf0iX0/kakaolink40_original.png",
"link":
{
"web_url": "naver.com",
"mobile_web_url": "naver.com"
},
"description": "설명"
},

"buttons": [
{
"title": "버튼",
"link":
{
"web_url": "noirstar.tistory.com",
"mobile_web_url": "noirstar.tistory.com"
}
}
]

}
};
34 changes: 2 additions & 32 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const coronaM = Bridge.getScopeOf("corona.js");
const lottoM = Bridge.getScopeOf("lotto.js");
const Jsoup = org.jsoup.Jsoup;
const env = require('env.js');
const kalink = require('kalink.js');
const kaling = require('kaling.js').Kakao();
const Kakao = new kaling;

Expand Down Expand Up @@ -137,38 +138,7 @@ function response(room, msg, sender, isGroupChat, replier, ImageDB, packageName,
//테스트
if (msg == ".테") {
try{
Kakao.send(room,
{
"link_ver": "4.0",
"template_object":
{
"object_type": "feed",
"button_title": "버튼",

"content": {
"title": "제목",
"image_url": "http://k.kakaocdn.net/dn/dEwroC/btqgdYG36hU/1zQbPe8ZLpGGmoMkrf0iX0/kakaolink40_original.png",
"link":
{
"web_url": "naver.com",
"mobile_web_url": "naver.com"
},
"description": "설명"
},

"buttons": [
{
"title": "버튼",
"link":
{
"web_url": "noirstar.tistory.com",
"mobile_web_url": "noirstar.tistory.com"
}
}
]

}
});
Kakao.send(room,kalink.test);
}catch(e) {
replier.reply(e);
}
Expand Down
3 changes: 2 additions & 1 deletion update.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ adb push corona.js storage/emulated/legacy/katalkbot/Bots/corona/index.js
adb push lotto.js storage/emulated/legacy/katalkbot/Bots/lotto/index.js
adb push env.js storage/emulated/legacy/katalkbot/global_modules/env.js
adb push kaling.js storage/emulated/legacy/katalkbot/global_modules/kaling.js
adb push crypto.js storage/emulated/legacy/katalkbot/global_modules/crypto.js
adb push crypto.js storage/emulated/legacy/katalkbot/global_modules/crypto.js
adb push kalink.js storage/emulated/legacy/katalkbot/global_modules/kalink.js

0 comments on commit 553b8c2

Please sign in to comment.