Log for
OwO
/pm %9#96#9#(^。(。—’<—{/{·/{·8@84@85@*%」*%』}『\{·/]-·]…<’…}—’<]·/]·/]—<’<—‼§℃‼†℃©€¿€©©€¿©€¿※†℃※†℃※❲‘”‘”‘❳”[❳❨}❨{{❨){❨)❲❨)❲”❵❲〙︶』〘〕『〘〔『〔】〔」】『[{❨”❲❵”†℃“<’“>’“>’“>’“>{·{·/{·/{/·{『/{『\{『\{『\©†‖©†©†‖©†‖‼†‖£®‖‼£‖©€‖‥‗‡‖‗}❨[❨[{❨){❨){❨){}{}){}){}){❨❵❲”❵❲”︺︷』︹︶』︹︶『︹︶『『︶】〕『】〔」︹︶︽︹︶︽︸︶︶『】︵」〔】」》】」↘↟↦↟↢↥↢↞↥↞↗↥↞↗↛↖↓↤↞↗↥↞↡↥↫↦↽↽↻⇁↺↳↷↳↯↶↯↲⇁↽↺⇁↺↽↺⇁↽↺⇁⇐⇗⇗⇔⇐⇖⇔⇌⇏⇓⇋⇎⇜⇕⇘⇜⇕⇘⇜≧≪⊗∼≮⊗∼≮≤±≤÷∼≮≤≮≧⊗≧≮⊗∝∏∠∨√∮∩∨∮∩∨∬∑∨∮∑∧∨∮∨∩∮∨∩∮∩∨∨∮∑∨∮∶∴∶∴∶∵∷∵∷∵∷αθοαθηⁿεηⁿε⊇ⁿεηⁿεⁿΞΛΘΞΛΘΞΑΘΞΑΘΛΞΡΞΛΡΔΛΘΑΔΘΔΑ⑶⑨⑤⑼⑶⑧⑤⑶⑧⑤⑵⑧⑤⑵⑧⑤⑵⑧⑤⑵⑧⑤⑶ⅣⅠ㈦Ⅰ㈢㈥㈩ⅣⅦⅠⅥⅣ㈩㈥Ⅲ㈩㈥㈢㈩㈥㈢ⅠⅬⅩⅮⅫⅩ³ⅿⅼⅷⅼⅴⅷⅻⅷⅴⅻⅴⅷⅻⅻⅾ²¹◀▶▲⬜▷▲⬜⬜▶◇⬜▶▲⬜■◑▼▶◑⬜▶▲✛✠✝✚✕❖✙✛✞✢✞✛✘✔✶✱✸✶✱✸✵✸✻✾✷✵✰◉❒❍❒❌◉❑◈○❐❉❌❐○◈○◈❑❌◈❐❌◈(*゚∀゚)(´・ω・`)(*´ω`*)(*゚∀゚)(´・ω・`)(*´ω`*)(´・ω・`)(*´ω`*)(✽ ゚д゚ ✽)(๑•̀ㅂ•́)و✧。゚(゚´Д`゚)゚。(๑•̀ㅂ•́)و✧(✽ ゚д゚ ✽)。゚(゚´Д`゚)゚。(*´ω`*)(*´∀`)。゚(゚´Д`゚)゚。(´・ω・`)😂😍😋😙😄😂😉😅😂😊😍😋😚
我是 class MyCommand extends Icommand
而且還要實作 hasPermission 跟 getHelp
因為Java一整個文件化,你可以直接知道那個變數的type
@mmis1000 我要註明一部分code是抄你的嗎
我在想可以在bash on ubuntu on windows跑node.js嗎?
ClassNotFoundExcwption: SeadogCodePareser does not exist
然後很機掰的要在config裏面 new Cmd()
git remote add origin xxxxxxxx
git push -u origin master
james58899@DESKTOP-BAS4ASC:~$ npm version
{ npm: '3.10.3',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '57.1',
modules: '48',
node: '6.3.0',
openssl: '1.0.2h',
uv: '1.9.1',
v8: '5.0.71.52',
zlib: '1.2.8' }
james58899@DESKTOP-BAS4ASC:~/TGBOT$ npm install
npm WARN enoent ENOENT: no such file or directory, open '/home/james58899/TGBOT/package.json'
npm WARN TGBOT No description
npm WARN TGBOT No repository field.
npm WARN TGBOT No README data
npm WARN TGBOT No license field.
james58899@DESKTOP-BAS4ASC:~/TGBOT$ ls
LICENSE node_modules README.md tg.js
james58899@DESKTOP-BAS4ASC:~/TGBOT$ node tg.js
module.js:442
throw err;
^
Error: Cannot find module 'request'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/james58899/TGBOT/tg.js:1:77)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
james58899@DESKTOP-BAS4ASC:~/TGBOT$ node tg.js
james58899@DESKTOP-BAS4ASC:~/TGBOT$ ls
LICENSE node_modules package.json README.md tg.js
到底那個bot你clone下來然後你還要寫code才能用的
@james58899 戳 tg.js記得也更新喔(?
james58899@DESKTOP-BAS4ASC:~/TGBOT$ git pull
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 6 (delta 3), reused 5 (delta 2), pack-reused 0
Unpacking objects: 100% (6/6), done.
From
https://github.com/koru1130/TGBOT
0b8d3e8..6888a7f master -> origin/master
Updating 0b8d3e8..6888a7f
Fast-forward
example.js | 8 ++++++++
tg.js | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 example.js
james58899@DESKTOP-BAS4ASC:~/TGBOT$ node tg.js
james58899@DESKTOP-BAS4ASC:~/TGBOT$ node example.js
Added Command : reply
Error: ETIMEDOUT
Error: ETIMEDOUT
你long polling時間大於request的timeout時間
@james58899 15000是15秒沒錯的樣子
不好意思 15000 是 request的timeout
應該API timeout+幾秒設為request的timeout
只要 @koru_bot 發的訊息裡面有 「想」
bot就reply 買啊!
@Sciuridae 所以你要寫叫 @koru_bot 買買買的bot?
Still has no access to messages
@james58899 你要不要我的框架試試看(?
是我iPad的Telegram沒在更新 還是那Bot真的還是 has no access to messages
因為bot現在看的到我發的訊息,然後其他人發的看不到
@james58899 可能是因為你的用途怪怪的才一直不能用吧
var TGBOT = require("./tg");
var bot = new TGBOT({token:''});
bot.addCmd('reply',function(args,toolBox){
var text = args[0] || "Hello";
toolBox.replyMsg(text);
});
bot.start();
addCmd格式是什麼,豪恐怖
bot哪來的
TGBOT又是哪來的
start()不用傳入東西嗎?
@koru1130 你不覺得你7行code我就能問7行問題很厲害嗎?
而且只要在c9同時打開tg.js和example.js大部分的東西都知道了阿
@james58899 難不成你是第一天看到js就在寫bot喔
@james58899 可是他已經寫過一個練習用的bot了阿
不過,我現在的Bot,功能不知道要做什麼了ww
有時間,氣象,沒了XD
@YamiOdymel 關於caris死惹 你怎麼說
我有個問題ww
要怎麼讓他執行之後
先噴出一句話呀?
C9註冊怪怪的…
資料填好後
安Next到信用卡資訊
不能跳過,按Next也無法…
Key是弄在
var bot = new TGBOT({token:''});
的token裡面吼
因為你Workspace是私人的 所以我不能主動發request
/give @a 1 minecraft:command _block
/give koru1130 minecraft:dirt
Um…明天開始把
今天有點累了XD
指令要怎麼寫入呀?
話說,有辦法讓bot紀錄我們的聊天內容嗎?
像是把聊天內容寫入到一個檔案之類的
@koru1130 我先把C9關掉哦
我有事情ww
晚一點才會用
好吧,寫入還是有問題ww
輸入Test後輸入1
1把Test覆蓋ww
雖然我log是直接 node bot.js | tee log file
這樣啦…
Tee就是把程式輸出到銀幕的東西,另外存一份到檔案
@mmis1000 有辦法讓js所有錯誤都null掉嗎?
Unhandled rejection Error
基本上都ok
但是,之前記錄錯誤的部分還好跳出來ww
不是那個問題ww
是已經習慣殘風的架構
他的很直覺化ww
換你的架構
還沒有習慣ww
@koru1130 還有一個問題,你TMD為什麼不直接寫在README.md或github wiki