Jump to...
redirecting...

Log for OwO

/botinfo
一樣QwQ
你要不要console.log(message);試試
等等,我空白錯地方
所以console.log的結果?
@as2174 所以我說那個console.log的結果
結果就是跳出跟殘風框架一樣的內容ww
貼出來啦
啊,我知道了
是from
/goingto sleep
/goingto sleep
覺得這功能好白痴
回應好慢…
@koru1130 你的/wmmm那隻bot的code能借我看一下嗎?
等等,我發現我bot的privacy沒關 還可以接收訊息OAO
很噁心欸 你真的要看嗎(#
沒關係ww
是C9的專案嗎?
我找一下
var TGBOT = require("./tg"); var bot = new TGBOT({token:''}); var userlist = []; bot.addCmd('wmmm',function(toolBox, args,message) { if(!userlist[message.from.username]){return;} var text=""; userlist[message.from.username].messages.forEach(function(curr,i,arr){ text+=curr.from.username +' : '+ curr.text+'\n'; }); toolBox.replyMsg(text); },'最後幾條被提到的訊息','/wmm mode \nmode: 1:只有reply 2:只有@ 3:全部\n'); bot.addCmd('subscribe',function(toolBox, args,message) { //if(args[1]=="true"){ userlist[message.from.username] = {}; userlist[message.from.username].messages = []; userlist[message.from.username].name=message.from.username; // }else{ //delete userlist[message.from.username]; // } },'訂閱','/subscribe');// true:訂閱\n/subscribe false:取消訂閱 bot.on('message',function(message){ for(var i in userlist){ var a = false; if(message.reply_to_message){ if(message.reply_to_message.from.username==userlist[i].name){a=true;} } if(new RegExp(userlist[i].name).test(message.text)||a){ userlist[i].messages.push(message); if(userlist[i].messages.length>5){ userlist[i].messages.shift(); } } // console.log(i); } }); bot.start();
感謝ww
我想做出 Username going to 什麼事情 然後有人tag他,bot回覆他在做什麼事情這樣w
晚點電腦用好再來寫w
好喔
不過我感覺好像沒什麼用XD
/maketext 測試
Wow