diff --git a/README.md b/README.md
index 9ae886a..f63475e 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,6 @@
# Star Yuuki(pYthon) BOT - Yuuki
-<<<<<<< HEAD
![Version](https://img.shields.io/badge/v8-OpenSource-FF0033.svg)
-=======
-> v6 receives security updates only, no feature will be added.
-
-![Version](https://img.shields.io/badge/v6.5.3-OpenSource-FF0033.svg)
->>>>>>> v6
![Series](https://img.shields.io/badge/syb-Series-7700FF.svg)
![License](https://img.shields.io/badge/license-MPL--2.0-FF6600.svg)
![Python](https://img.shields.io/badge/python-3.x-0066FF.svg)
@@ -29,68 +23,7 @@ Since 2018, it turns to be an opensource software.
## Introduction
-<<<<<<< HEAD
Version `v8` is not ready.
-=======
-This is a LINE Group Security BOT, to solve the problem that prevent from someone who is not the management but trying to destroy the group.
-
-As know as the group feature of LINE has a major issue, everyone own the permission to modify the member list.
-
-It's a good idea to be fair, but causes a communicated risk if one of member kick everyone maliciously.
-
-So a protective solution is necessary, especially for corporation, organization, or education.
-
-Since 2015, we start to design and provide several solutions to the market and public, Star Yuuki BOT is one of the success cases.
-
-To protect Internet Security is our duty, and open source is romantic, that is why we are here.
-
-> Star Yuuki BOT is designed to be a completed BOT, don't use the software as a "Self BOT", it might damage your account.
-
-## License
-
-The software is licensed under [Mozilla Public License 2.0](LICENSE.md) with [COPYING.md](COPYING.md).
-
-[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fstar-inc%2Fstar_yuuki_bot.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fstar-inc%2Fstar_yuuki_bot?ref=badge_large)
-
-## Features
-
-It's a powerful software, not only a BOT, even to be your secretary.
-
-| Feature | Status | Note |
-|---|---|---|
-| Login for authorizing | X | [Read the document](https://github.com/star-inc/star_yuuki_bot/wiki/Configure) |
-| Basic Group Protection | O |
-| Specify the Vice Administrators of a Group | O |
-| Multiprocessing Support | O |
-| Advanced Group Protection | O |
-| [WebAdmin](#WebAdmin) | O |
-| General [Manual](https://line.starinc.xyz/yuuki_manual/) for Users | O |
-| [Documentation](#Documents) for Developers | O |
-| 100% [OpenSource](https://github.com/star-inc/star_yuuki_bot) and Free | O | [Licensed](#License) |
-
-## WebAdmin
-
-This is a magic feature since `v6.5.3` that you can control your BOT with GUI.
-
-| Feature | Status | Note |
-|---|---|---|
-| Broadcast | O | Group only currently |
-| Events Viewer | O |
-| Profile Modify | O |
-| Groups Management | O |
-| Helper Management | O |
-| Yuuki Configure | X | Will be available in v8 |
-
-![WebAdmin](WebAdmin.png)
-
-## Documents
-
-Are you finding how to set up, configure, and use it, or extend its features?
-
-The documentation for developers is available on [GitHub Wiki](https://github.com/star-inc/star_yuuki_bot/wiki).
-
-Welcome to help us for improving and making `Yuuki` better!
->>>>>>> v6
## Logo Copyright
diff --git a/archived/v5.0.py b/archived/v5.0.py
deleted file mode 100644
index fe9fa9b..0000000
--- a/archived/v5.0.py
+++ /dev/null
@@ -1,125 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- Star Neptune Bot - Yuuki
- ~~~~~~~~~~~
-
- Star pYthon Bot = Star Yuuki Bot = SYB
-
- :copyright: (c) 2016 Star Inc.
-"""
-from api import *
-import api.mu
-import time, os
-
-account=''
-password=''
-king=''
-nc=''
-ss=''
-
-try:
- syb = LineClient(account,password)
-except:
- print "Login Failed"
-
-print 'Login OK'
-
-kgroupid = ''
-kgroup = ''
-kuser = ''
-kcontact = ''
-localtime = time.asctime(time.localtime(time.time()))
-log=open("yuuki-status","a+")
-log.write("
"+localtime+": Start")
-for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
-
-while True:
- ts=time.asctime( time.localtime(time.time()) )
- try:
- if "Error, Error, Error, Error, Error, Error, Error, Error," in open(".error-log","r").read():
- syb.getContactById(king).sendMessage("SafeMode On")
- time.sleep(180)
- if len(syb._getGroupIdsInvited()) >= 45:
- syb.getContactById(king).sendMessage("Security!")
- while True:
- if len(syb._getGroupIdsInvited()) >= 7:
- for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
- else:
- time.sleep(90)
- else:
- syb.getContactById(king).sendMessage("Program Off")
- os.system('~/k')
- try:
- gc=syb.sybKcheck()
- except:
- pass
- if gc==None or gc.param1 == kgroupid and gc.param2 == kuser and gc.param3 == kcontact:
- syb.revision = syb._getLastOpRevision()
- if len(syb._getGroupIdsInvited()) >= 1:
- gi = syb._getGroupIdsInvited()[0]
- syb._acceptGroupInvitation(gi)
- syb.refreshGroups()
- syb.refreshContacts()
- gg=syb.getGroupById(gi)
- gm = gg.members
- ge = gg.invitee
- log = open("yuuki-status", "a+")
- if gi == kgroupid:
- log.write("
" + str(ts) + ": ReJoin: " + gg.name + " ->Members/Invites :" + str(len(gm)) + "/" + str(len(ge)))
- elif "✘" in syb.getContactById(king).name or len(syb.getGroupById(gi).members) >= 50:
- log.write("
" + str(ts) + ": Join: " + gg.name + " ->Members/Invites :" + str(len(gm)) + "/" + str(len(ge)))
- gg.sendMessage('安安^^\n我是刀劍神域的絕劍呦><\n我叫作友紀,請多多指教OwO')
- #gg.sendMessage('((如果要我離開,請管理員直接踢我就可以了0.0\n##千萬不能踢我的姐姐\n##千萬不能踢我的姐姐\n##千萬不能踢我的姐姐\n不然我會請你出去XD')
- if gg.creator:
- gc=gg.creator
- else:
- gc = gg.members[0]
- syb.getGroupById(gi).sendMessage('本群組管理員:'+gc.name)
- if not ss in gg.getMemberIds():
- #syb._inviteIntoGroup(gi,[ss])
- pass
- else:
- pass
- else:
- log.write("
" + str(ts) + ": NoJoin: " + gg.name + " ->Members/Invites :" + str(len(gm)) + "/" + str(len(ge)))
- syb._leaveGroup(gi)
- else:
- pass
- else:
- log = open("yuuki-status", "a+")
- kgroupid=gc.param1
- kgroup=syb.getGroupById(kgroupid)
- kuser=gc.param2
- kcontact=gc.param3
- if kgroup.creator != None:
- k=kgroup.creator
- ka=k.id
- else:
- k=kgroup.members[0]
- ka=k.id
- if kuser in [ka,king,nc]:
- pass
- else:
- kgroup.sendMessage('除非管理員,否則不可以踢人呦^^')
- syb._kickoutFromGroup(kgroupid, [kuser])
- try:
- syb._findAndAddContactsByMid(kcontact)
- syb._inviteIntoGroup(kgroupid, [kcontact])
- bist='Back'
- except:
- kcgurl=api.mu.get(kcontact)
- if kcgurl == None:
- kcaurl='加入好友網址取得失敗'
- else:
- kcaurl=kcgurl
- kgroup.sendMessage("邀請受到官方限制,請自行邀回@@\n被踢者:"+kcaurl)
- bist='NoBack'
- log.write("
" + str(ts) + ": Save: " + kgroup.name + "
->Kicker/Kicked/Admin :" + kuser+ "/" + kcontact +"("+bist+")" + "/" +k.name+"("+ka+")")
- except:
- syb = LineClient(account,password)
- log = open("./.error-log", "a+")
- log.write("Error, ")
diff --git a/archived/v5.1.py b/archived/v5.1.py
deleted file mode 100644
index 89e9232..0000000
--- a/archived/v5.1.py
+++ /dev/null
@@ -1,150 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- Star Neptune Bot - Yuuki
- ~~~~~~~~~~~
-
- Star pYthon Bot = Star Yuuki Bot = SYB
-
- :copyright: (c) 2016 Star Inc.
-"""
-from api import *
-from api.core.ttypes import Message
-import api.mu
-import time, os
-
-account=''
-password=''
-king=''
-nc=''
-sss=''
-ss=''
-s=''
-
-try:
- syb = LineClient(account,password)
- print 'Login OK'
-except:
- print "Login Failed"
-
-gi=''
-gg=''
-gm=''
-ge=''
-kgroupid = ''
-kgroup = ''
-kuser = ''
-kcontact = ''
-localtime = time.asctime(time.localtime(time.time()))
-log=open("yuuki-status","a+")
-log.write("
"+localtime+": Start")
-for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
-
-while True:
- ts=time.asctime( time.localtime(time.time()) )
- try:
- if "Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, " in open(".error-log","r").read():
- syb.getContactById(king).sendMessage("SafeMode On")
- time.sleep(120)
- if len(syb._getGroupIdsInvited()) >= 15:
- syb.getContactById(king).sendMessage("Security!")
- while True:
- if len(syb._getGroupIdsInvited()) >= 7:
- for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
- else:
- time.sleep(90)
- else:
- syb.getContactById(king).sendMessage("Program Off")
- #os.system('~/k')
- os.system('sh ~/.ss/syb/restart.sh')
- try:
- gc=syb.sybKcheck()
- except:
- pass
- if gc==None or gc.param1 == kgroupid and gc.param2 == kuser and gc.param3 == kcontact:
- syb.revision = syb._getLastOpRevision()
- log = open("yuuki-status", "a+")
- if len(syb._getGroupIdsInvited()) >= 1:
- try:
- gi = syb._getGroupIdsInvited()[0]
- syb._acceptGroupInvitation(gi)
- gg = syb._getGroups([gi])[0]
- gm = gg.members
- ge = gg.invitee
- if gg.creator:
- gc = gg.creator
- else:
- gc = gg.members[0]
- if gi == kgroupid:
- log.write("
" + str(
- ts) + ": ReJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- elif "✘" in syb._getContacts([king])[0].displayName or len(gg.members) >= 50:
- syb.refreshGroups()
- log.write("
" + str(ts) + ": Join: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- msg = '安安^^\n我是刀劍神域的絕劍呦><\n我叫作友紀,請多多指教OwO'
- # syb.sendMessage(0, Message(to=gi, contentType=0, text=msg))
- syb.getGroupById(gi).sendMessage(msg)
- msg = '使用說明及最新消息請至\nhttp://line.me/ti/p/@niq6886v\n之主頁瀏覽,謝謝^^\n本群組管理員:' + gc.displayName
- # syb.sendMessage(0, Message(to=gi, contentType=0, text=msg))
- syb.getGroupById(gi).sendMessage(msg)
- if not ss in gg.getMemberIds():
- # syb._inviteIntoGroup(gi,[ss])
- pass
- else:
- pass
- else:
- log.write("
" + str(
- ts) + ": NoJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(
- len(gm)) + "/" + str(len(ge)))
- syb._leaveGroup(gi)
- except:
- #log.write("
" + str(ts) + ": NotJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- #try:
- #syb._leaveGroup(gi)
- #except:
- pass
- else:
- pass
- else:
- kgroupid=gc.param1
- kgroup=syb.getGroupById(kgroupid)
- kuser=gc.param2
- kcontact=gc.param3
- if kgroup.creator != None:
- k=kgroup.creator
- ka=k.id
- else:
- k=kgroup.members[0]
- ka=k.id
- if kuser in [ka,king,nc]:
- pass
- elif kcontact in syb._getBlockedContactIds():
- kgroup.sendMessage('除非管理員,否則不可以踢人呦^^')
- kgroup.sendMessage('被踢者在封鎖名單內!故無法邀請\n如有需要,請自行邀回:')
- kgroup.sendUser(kcontact)
- else:
- kgroup.sendMessage('除非管理員,否則不可以踢人呦^^')
- try:
- syb._kickoutFromGroup(kgroupid, [kuser])
- except:
- kgroup.sendMessage('緊告!有人正在踢人!請進入群組檢查!\n##系統因限制無法踢人==')
- try:
- syb._findAndAddContactsByMid(kcontact)
- syb._inviteIntoGroup(kgroupid, [kcontact])
- bist='Back'
- except:
- kgroup.sendMessage("邀請受到官方限制,請自行邀回@@\n被踢者:")
- kgroup.sendUser(kcontact)
- bist='NoBack'
- log.write("
" + str(ts) + ": Save: " + kgroup.name + "
->Kicker/Kicked/Admin :" + kuser+ "/" + kcontact +"("+bist+")" + "/" +k.name+"("+ka+")")
- except:
- try:
- syb = LineClient(authToken=syb.authToken)
- except:
- syb.updateAuthToken()
- syb = LineClient(authToken=syb.authToken)
- log = open("./.error-log", "a+")
- log.write("Error, ")
diff --git a/archived/v5.2.py b/archived/v5.2.py
deleted file mode 100644
index 34aa3fa..0000000
--- a/archived/v5.2.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- Star Neptune Bot - Yuuki
- ~~~~~~~~~~~
-
- Star pYthon Bot = Star Yuuki Bot = SYB
-
- :copyright: (c) 2016 Star Inc.
-"""
-from api import *
-from api.core.ttypes import Message
-import api.mu
-import time, os
-
-account=''
-password=''
-king=''
-nc=''
-sss=''
-ss=''
-s=''
-
-try:
- syb = LineClient(account,password)
- print 'Login OK'
-except:
- print "Login Failed"
-
-gi=''
-gg=''
-gm=''
-ge=''
-kgroupid = ''
-kgroup = ''
-kuser = ''
-kcontact = ''
-localtime = time.asctime(time.localtime(time.time()))
-log=open("yuuki-status","a+")
-log.write("
"+localtime+": Start")
-for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
-
-while True:
- ts=time.asctime( time.localtime(time.time()) )
- try:
- gc=syb.sybKcheck()
- if gc==None or gc.param1 == kgroupid and gc.param2 == kuser and gc.param3 == kcontact:
- syb.revision = syb._getLastOpRevision()
- log = open("yuuki-status", "a+")
- if len(syb._getGroupIdsInvited()) >= 1:
- try:
- gi = syb._getGroupIdsInvited()[0]
- syb._acceptGroupInvitation(gi)
- gg = syb._getGroups([gi])[0]
- gm = gg.members
- ge = gg.invitee
- if gg.creator:
- gc = gg.creator
- else:
- gc = gg.members[0]
- if gi == kgroupid:
- log.write("
" + str(
- ts) + ": ReJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- elif "✘" in syb._getContacts([king])[0].displayName or len(gg.members) >= 50:
- syb.refreshGroups()
- log.write("
" + str(ts) + ": Join: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- msg = '安安^^\n我是刀劍神域的絕劍呦><\n我叫作友紀,請多多指教OwO'
- syb.getGroupById(gi).sendMessage(msg)
- msg = '使用說明及最新消息請至\nhttp://line.me/ti/p/@niq6886v\n之主頁瀏覽,謝謝^^\n本群組管理員:' + gc.displayName
- syb.getGroupById(gi).sendMessage(msg)
- if not ss in gg.getMemberIds():
- pass
- else:
- pass
- else:
- log.write("
" + str(
- ts) + ": NoJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(
- len(gm)) + "/" + str(len(ge)))
- syb._leaveGroup(gi)
- except:
- pass
- else:
- pass
- else:
- kgroupid=gc.param1
- kgroup=syb.getGroupById(kgroupid)
- kuser=gc.param2
- kcontact=gc.param3
- if kgroup.creator != None:
- k=kgroup.creator
- ka=k.id
- else:
- k=kgroup.members[0]
- ka=k.id
- if kuser in [ka,king,nc]:
- pass
- elif kcontact in syb._getBlockedContactIds():
- kgroup.sendMessage('除非管理員,否則不可以踢人呦^^')
- kgroup.sendMessage('被踢者在封鎖名單內!故無法邀請\n如有需要,請自行邀回:')
- kgroup.sendUser(kcontact)
- else:
- kgroup.sendMessage('除非管理員,否則不可以踢人呦^^')
- try:
- syb._kickoutFromGroup(kgroupid, [kuser])
- kist = 'Kick'
- except:
- kgroup.sendMessage('緊告!有人正在踢人!請進入群組檢查!\n##系統因限制無法踢人==')
- kist = 'NoKick'
- kgroup.sendMessage("請自行邀回0.0\n被踢者:")
- kgroup.sendUser(kcontact)
- if syb._getGroup(kgroupid).preventJoinByTicket == False:
- syb._changeGroupUrlStatus(kgroupid, False)
- ust = 'Yes'
- else:
- usr = 'No'
- log.write("
%s: Save: %s
->Kicker/Kicked/Admin/Url :%s(%s)/%s/%s(%s)/%s") % (ts, kgroup.name, kuser, kist, kcontact, k.name, ka, ust)
- except:
- syb.login()
diff --git a/archived/v6.0.py b/archived/v6.0.py
deleted file mode 100644
index b905eda..0000000
--- a/archived/v6.0.py
+++ /dev/null
@@ -1,140 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- Star Neptune Bot - Yuuki
- ~~~~~~~~~~~
-
- Star pYthon Bot = Star Yuuki Bot = SYB
-
- :copyright: (c) 2016 Star Inc.
-"""
-from api import *
-from api.core.ttypes import Message
-import time
-
-account=''
-password=''
-king=''
-nc=''
-sss=''
-ss=''
-s=''
-
-try:
- syb = LineClient(account,password)
- print 'Login OK'
-except:
- print "Login Failed"
-
-gi=''
-gg=''
-gm=''
-ge=''
-kgroupid = ''
-kgroup = ''
-kuser = ''
-kcontact = ''
-localtime = time.asctime(time.localtime(time.time()))
-log=open("yuuki-status","a+")
-log.write("
"+localtime+": Start")
-for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
-
-while True:
- ts=time.asctime( time.localtime(time.time()) )
- try:
- gc=syb.sybKcheck()
- if gc==None or gc.param1 == kgroupid and gc.param2 == kuser and gc.param3 == kcontact:
- syb.revision = syb._getLastOpRevision()
- if len(syb._getGroupIdsInvited()) >= 1:
- try:
- gi = syb._getGroupIdsInvited()[0]
- gg = syb._getGroup(gi)
- syb._acceptGroupInvitation(gi)
- gm = gg.members
- ge = gg.invitee
- if gg.creator:
- gc = gg.creator
- else:
- gc = gg.members[0]
- if gi == kgroupid:
- log.write("
" + str(
- ts) + ": ReJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- elif "✘" in syb._getContacts([king])[0].displayName or len(gg.members) >= 100:
- log.write("
" + str(ts) + ": Join: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- msg = '安安^^\n我是刀劍神域的絕劍呦><\n我叫作友紀,請多多指教OwO'
- text = Message(to=gi, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- msg = '使用說明及最新消息請至\nhttp://line.me/ti/p/@niq6886v\n之主頁瀏覽,謝謝^^\n本群組管理員:' + gc.displayName
- text = Message(to=gi, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- if not ss in gg.getMemberIds():
- pass
- else:
- pass
- else:
- log.write("
" + str(
- ts) + ": NoJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(
- len(gm)) + "/" + str(len(ge)))
- syb._leaveGroup(gi)
- except:
- pass
- else:
- pass
- else:
- kgroupid=gc.param1
- kgroup=syb._getGroup(kgroupid)
- kuser=gc.param2
- kcontact=gc.param3
- if kgroup.creator != None:
- k=kgroup.creator
- ka=k.mid
- else:
- k=kgroup.members[0]
- ka=k.mid
- if kuser in [ka,king,nc]:
- pass
- elif kcontact in syb._getBlockedContactIds():
- msg='除非管理員,否則不可以踢人呦^^'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- msg='被踢者在封鎖名單內!\n如有需要,請自行邀回:'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- kgroup.sendUser(kcontact)
- else:
- msg='除非管理員,否則不可以踢人呦^^'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- try:
- syb._kickoutFromGroup(kgroupid, [kuser])
- kist = 'Kick'
- except:
- msg='緊告!有人正在踢人!請進入群組檢查!\n##系統因限制無法踢人=='
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- kist = 'NoKick'
- if kcontact == ka or kcontact == king or kcontact == ss:
- try:
- syb._inviteIntoGroup(kgroupid, kcontact)
- except:
- msg="請自行邀回0.0\n被踢者:"
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- text = Message(contentType=13, text='', contentMetadata = {'mid': kcontact,'displayName': 'Line User',}, to=kgroupid)
- syb.sendMessage(text)
- else:
- msg="請自行邀回0.0\n被踢者:"
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- text = Message(contentType=13, text='', contentMetadata = {'mid': kcontact,'displayName': 'Line User',}, to=kgroupid)
- syb.sendMessage(text)
- if kgroup.preventJoinByTicket == False:
- syb._changeGroupUrlStatus(kgroupid, False)
- ust = 'Yes'
- else:
- ust = 'No'
- if not kgroupid == None:
- log.write("
%s: Save: %s
->Kicker/Kicked/Admin/Url :%s(%s)/%s/%s(%s)/%s" % (ts, kgroup.name, kuser, kist, kcontact, k.name, ka, ust))
- except:
- syb.login()
diff --git a/archived/v6.1.py b/archived/v6.1.py
deleted file mode 100644
index aad2c31..0000000
--- a/archived/v6.1.py
+++ /dev/null
@@ -1,140 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- Star Neptune Bot - Yuuki
- ~~~~~~~~~~~
-
- Star pYthon Bot = Star Yuuki Bot = SYB
-
- :copyright: (c) 2016 Star Inc.
-"""
-from api import *
-from api.core.ttypes import Message
-import time
-
-account=''
-password=''
-king=''
-nc=''
-sss=''
-ss=''
-s=''
-
-try:
- syb = LineClient(account,password,refreshCacheDatas=False)
- print 'Login OK'
-except:
- print "Login Failed"
-
-gi=''
-gg=''
-gm=''
-ge=''
-kgroupid = ''
-kgroup = ''
-kuser = ''
-kcontact = ''
-localtime = time.asctime(time.localtime(time.time()))
-log=open("yuuki-status","a+")
-log.write("
"+localtime+": Start")
-for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
-
-while True:
- ts=time.asctime( time.localtime(time.time()) )
- try:
- gc=syb.sybKcheck()
- if gc==None or gc.param1 == kgroupid and gc.param2 == kuser and gc.param3 == kcontact:
- syb.revision = syb._getLastOpRevision()
- if len(syb._getGroupIdsInvited()) >= 1:
- try:
- gi = syb._getGroupIdsInvited()[0]
- gg = syb._getGroup(gi)
- syb._acceptGroupInvitation(gi)
- gm = gg.members
- ge = gg.invitee
- if gg.creator:
- gc = gg.creator
- else:
- gc = gg.members[0]
- if gi == kgroupid:
- log.write("
" + str(
- ts) + ": ReJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- elif "✘" in syb._getContacts([king])[0].displayName or len(gg.members) >= 100:
- log.write("
" + str(ts) + ": Join: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- msg = '安安^^\n我是刀劍神域的絕劍呦><\n我叫作友紀,請多多指教OwO'
- text = Message(to=gi, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- msg = '使用說明及最新消息請至\nhttp://line.me/ti/p/@niq6886v\n之主頁瀏覽,謝謝^^\n本群組管理員:' + gc.displayName
- text = Message(to=gi, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- if not ss in gg.getMemberIds():
- pass
- else:
- pass
- else:
- log.write("
" + str(
- ts) + ": NoJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(
- len(gm)) + "/" + str(len(ge)))
- syb._leaveGroup(gi)
- except:
- pass
- else:
- pass
- else:
- kgroupid=gc.param1
- kgroup=syb._getGroup(kgroupid)
- kuser=gc.param2
- kcontact=gc.param3
- if kgroup.creator != None:
- k=kgroup.creator
- ka=k.mid
- else:
- k=kgroup.members[0]
- ka=k.mid
- if kuser in [ka,king,nc]:
- pass
- elif kcontact in syb._getBlockedContactIds():
- msg='除非管理員,否則不可以踢人呦^^'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- msg='被踢者在封鎖名單內!\n如有需要,請自行邀回:'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- kgroup.sendUser(kcontact)
- else:
- msg='除非管理員,否則不可以踢人呦^^'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- try:
- syb._kickoutFromGroup(kgroupid, [kuser])
- kist = 'Kick'
- except:
- msg='緊告!有人正在踢人!請進入群組檢查!\n##系統因限制無法踢人=='
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- kist = 'NoKick'
- if kcontact == ka or kcontact == king or kcontact == ss:
- try:
- syb._inviteIntoGroup(kgroupid, kcontact)
- except:
- msg="請自行邀回0.0\n被踢者:"
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- text = Message(contentType=13, text='', contentMetadata = {'mid': kcontact,'displayName': 'Line User',}, to=kgroupid)
- syb.sendMessage(text)
- else:
- msg="請自行邀回0.0\n被踢者:"
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- text = Message(contentType=13, text='', contentMetadata = {'mid': kcontact,'displayName': 'Line User',}, to=kgroupid)
- syb.sendMessage(text)
- if kgroup.preventJoinByTicket == False:
- syb._changeGroupUrlStatus(kgroupid, False)
- ust = 'Yes'
- else:
- ust = 'No'
- if not kgroupid == None:
- log.write("
%s: Save: %s
->Kicker/Kicked/Admin/Url :%s(%s)/%s/%s(%s)/%s" % (ts, kgroup.name, kuser, kist, kcontact, k.name, ka, ust))
- except:
- syb.login()
diff --git a/archived/v6.2.1.py b/archived/v6.2.1.py
deleted file mode 100644
index 2ff7c7c..0000000
--- a/archived/v6.2.1.py
+++ /dev/null
@@ -1,177 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- Star Neptune Bot - Yuuki
- ~~~~~~~~~~~
-
- Star pYthon Bot = Star Yuuki Bot = SYB
-
- :copyright: (c) 2016 Star Inc.
-"""
-from api import *
-from api.core.ttypes import Message
-import time
-
-account=''
-password=''
-king=''
-nc=''
-sss=''
-ss=''
-s=''
-
-try:
- syb = LineClient(account,password,refreshCacheDatas=False)
- print 'Login OK'
-except:
- print "Login Failed"
-
-gi=''
-gg=''
-gm=''
-ge=''
-kgroupid = ''
-kgroup = ''
-kuser = ''
-kcontact = ''
-kicktimes=0
-localtime = time.asctime(time.localtime(time.time()))
-log=open("yuuki-status","a+")
-log.write("
"+localtime+": Start")
-for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
-
-while True:
- ts=time.asctime( time.localtime(time.time()) )
- try:
- gc=syb.sybKcheck()
- if gc==None or gc.param1 == kgroupid and gc.param2 == kuser and gc.param3 == kcontact:
- if syb.revision == -1:
- syb.revision = syb._getLastOpRevision()
- else:
- syb.revision = gc.revision
- urljoin=open('../talk/yuuki-join','r')
- uread = urljoin.read()
- if uread != "":
- try:
- if '\n' in uread:
- ouread = uread.replace('\n','')
- else:
- ouread = uread
- gg = syb._client.findGroupByTicket(ouread)
- syb._client.acceptGroupInvitationByTicket(0, gg.id, ouread)
- syb._changeGroupUrlStatus(gg.id, False)
- urljoin.close()
- urljoin=open('../talk/yuuki-join','w')
- except:
- pass
- elif time.localtime().tm_min == 55:
- kicktimes=0
- elif len(syb._getGroupIdsInvited()) >= 1:
- try:
- gi = syb._getGroupIdsInvited()[0]
- gg = syb._getGroup(gi)
- syb._acceptGroupInvitation(gi)
- gm = gg.members
- ge = gg.invitee
- if gg.creator:
- gc = gg.creator
- else:
- gc = gg.members[0]
- if gi == kgroupid:
- log.write("
" + str(
- ts) + ": ReJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- elif "✘" in syb._getContacts([king])[0].displayName or len(gg.members) >= 100:
- log.write("
" + str(ts) + ": Join: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- msg = '安安^^\n我是刀劍神域的絕劍呦><\n我叫作友紀,請多多指教OwO'
- text = Message(to=gi, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- msg = '使用說明及最新消息請至\nhttp://line.me/ti/p/@niq6886v\n之主頁瀏覽,謝謝^^\n本群組管理員:' + gc.displayName
- text = Message(to=gi, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- if not ss in gg.getMemberIds():
- pass
- else:
- pass
- else:
- log.write("
" + str(
- ts) + ": NoJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(
- len(gm)) + "/" + str(len(ge)))
- syb._leaveGroup(gi)
- except:
- pass
- else:
- pass
- urljoin.close()
- else:
- kgroupid=gc.param1
- kgroup=syb._getGroup(kgroupid)
- kuser=gc.param2
- kcontact=gc.param3
- if kgroup.creator != None:
- k=kgroup.creator
- ka=k.mid
- else:
- k=kgroup.members[0]
- ka=k.mid
- if kuser in [ka,king,nc]:
- pass
- elif kcontact in syb._getBlockedContactIds():
- msg='除非管理員,否則不可以踢人呦^^'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- msg='被踢者在封鎖名單內!\n如有需要,請自行邀回:'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- kgroup.sendUser(kcontact)
- else:
- msg='除非管理員,否則不可以踢人呦^^'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- if kicktimes <= 45:
- try:
- syb._kickoutFromGroup(kgroupid, [kuser])
- kist = 'Kick'
- kicktimes=kicktimes+1
- except:
- msg='緊告!有人正在踢人!請進入群組檢查!\n##系統因限制無法踢人=='
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- kist = 'NoKick'
- else:
- msg = '緊告!有人正在踢人!請進入群組檢查!\n##次數已達程序上限無法踢人=='
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- kist = 'SYBNoKick'
- if kcontact == ka or kcontact == king or kcontact == ss:
- if kcontact == ss:
- ull=syb._renewGroupUrl(kgroupid)
- urljoin = open('../talk/sc-join','w')
- syb._changeGroupUrlStatus(kgroupid, True)
- urljoin.write(ull)
- urljoin.close()
- else:
- try:
- syb._inviteIntoGroup(kgroupid, kcontact)
- except:
- msg = "請自行邀回0.0\n被踢者:"
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- text = Message(contentType=13, text='',
- contentMetadata={'mid': kcontact, 'displayName': 'Line User',}, to=kgroupid)
- syb.sendMessage(text)
- else:
- msg="請自行邀回0.0\n被踢者:"
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- text = Message(contentType=13, text='', contentMetadata = {'mid': kcontact,'displayName': 'Line User',}, to=kgroupid)
- syb.sendMessage(text)
- if kgroup.preventJoinByTicket == False:
- syb._changeGroupUrlStatus(kgroupid, False)
- ust = 'Yes'
- else:
- ust = 'No'
- if not kgroupid == None:
- log.write("
%s: Save: %s
->Kicker/Kicked/Admin/Url :%s(%s)/%s/%s(%s)/%s" % (ts, kgroup.name, kuser, kist, kcontact, k.name, ka, ust))
- except:
- syb.login()
\ No newline at end of file
diff --git a/archived/v6.2.py b/archived/v6.2.py
deleted file mode 100644
index a28dd02..0000000
--- a/archived/v6.2.py
+++ /dev/null
@@ -1,174 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- Star Neptune Bot - Yuuki
- ~~~~~~~~~~~
-
- Star pYthon Bot = Star Yuuki Bot = SYB
-
- :copyright: (c) 2016 Star Inc.
-"""
-from api import *
-from api.core.ttypes import Message
-import time
-
-account=''
-password=''
-king=''
-nc=''
-sss=''
-ss=''
-s=''
-
-try:
- syb = LineClient(account,password,refreshCacheDatas=False)
- print 'Login OK'
-except:
- print "Login Failed"
-
-gi=''
-gg=''
-gm=''
-ge=''
-kgroupid = ''
-kgroup = ''
-kuser = ''
-kcontact = ''
-kicktimes=0
-localtime = time.asctime(time.localtime(time.time()))
-log=open("yuuki-status","a+")
-log.write("
"+localtime+": Start")
-for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
-
-while True:
- ts=time.asctime( time.localtime(time.time()) )
- try:
- gc=syb.sybKcheck()
- if gc==None or gc.param1 == kgroupid and gc.param2 == kuser and gc.param3 == kcontact:
- syb.revision = syb._getLastOpRevision()
- urljoin=open('../talk/yuuki-join','r')
- uread = urljoin.read()
- if uread != "":
- try:
- if '\n' in uread:
- ouread = uread.replace('\n','')
- else:
- ouread = uread
- gg = syb._client.findGroupByTicket(ouread)
- syb._client.acceptGroupInvitationByTicket(0, gg.id, ouread)
- syb._changeGroupUrlStatus(gg.id, False)
- urljoin.close()
- urljoin=open('../talk/yuuki-join','w')
- except:
- pass
- elif time.localtime().tm_min == 55:
- kicktimes=0
- elif len(syb._getGroupIdsInvited()) >= 1:
- try:
- gi = syb._getGroupIdsInvited()[0]
- gg = syb._getGroup(gi)
- syb._acceptGroupInvitation(gi)
- gm = gg.members
- ge = gg.invitee
- if gg.creator:
- gc = gg.creator
- else:
- gc = gg.members[0]
- if gi == kgroupid:
- log.write("
" + str(
- ts) + ": ReJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- elif "✘" in syb._getContacts([king])[0].displayName or len(gg.members) >= 100:
- log.write("
" + str(ts) + ": Join: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(len(gm)) + "/" + str(len(ge)))
- msg = '安安^^\n我是刀劍神域的絕劍呦><\n我叫作友紀,請多多指教OwO'
- text = Message(to=gi, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- msg = '使用說明及最新消息請至\nhttp://line.me/ti/p/@niq6886v\n之主頁瀏覽,謝謝^^\n本群組管理員:' + gc.displayName
- text = Message(to=gi, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- if not ss in gg.getMemberIds():
- pass
- else:
- pass
- else:
- log.write("
" + str(
- ts) + ": NoJoin: " + gg.name + " ->Admin/Members/Invites :" + gc.displayName + "(" + gc.mid + ")" + "/" + str(
- len(gm)) + "/" + str(len(ge)))
- syb._leaveGroup(gi)
- except:
- pass
- else:
- pass
- urljoin.close()
- else:
- kgroupid=gc.param1
- kgroup=syb._getGroup(kgroupid)
- kuser=gc.param2
- kcontact=gc.param3
- if kgroup.creator != None:
- k=kgroup.creator
- ka=k.mid
- else:
- k=kgroup.members[0]
- ka=k.mid
- if kuser in [ka,king,nc]:
- pass
- elif kcontact in syb._getBlockedContactIds():
- msg='除非管理員,否則不可以踢人呦^^'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- msg='被踢者在封鎖名單內!\n如有需要,請自行邀回:'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- kgroup.sendUser(kcontact)
- else:
- msg='除非管理員,否則不可以踢人呦^^'
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- if kicktimes <= 45:
- try:
- syb._kickoutFromGroup(kgroupid, [kuser])
- kist = 'Kick'
- kicktimes=kicktimes+1
- except:
- msg='緊告!有人正在踢人!請進入群組檢查!\n##系統因限制無法踢人=='
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- kist = 'NoKick'
- else:
- msg = '緊告!有人正在踢人!請進入群組檢查!\n##次數已達程序上限無法踢人=='
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- kist = 'SYBNoKick'
- if kcontact == ka or kcontact == king or kcontact == ss:
- if kcontact == ss:
- ull=syb._renewGroupUrl(kgroupid)
- urljoin = open('../talk/sc-join','w')
- syb._changeGroupUrlStatus(kgroupid, True)
- urljoin.write(ull)
- urljoin.close()
- else:
- try:
- syb._inviteIntoGroup(kgroupid, kcontact)
- except:
- msg = "請自行邀回0.0\n被踢者:"
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- text = Message(contentType=13, text='',
- contentMetadata={'mid': kcontact, 'displayName': 'Line User',}, to=kgroupid)
- syb.sendMessage(text)
- else:
- msg="請自行邀回0.0\n被踢者:"
- text = Message(to=kgroupid, text=msg.encode('utf-8'))
- syb.sendMessage(text)
- text = Message(contentType=13, text='', contentMetadata = {'mid': kcontact,'displayName': 'Line User',}, to=kgroupid)
- syb.sendMessage(text)
- if kgroup.preventJoinByTicket == False:
- syb._changeGroupUrlStatus(kgroupid, False)
- ust = 'Yes'
- else:
- ust = 'No'
- if not kgroupid == None:
- log.write("
%s: Save: %s
->Kicker/Kicked/Admin/Url :%s(%s)/%s/%s(%s)/%s" % (ts, kgroup.name, kuser, kist, kcontact, k.name, ka, ust))
- except:
- syb.login()
diff --git a/archived/v6.3.0.py b/archived/v6.3.0.py
deleted file mode 100644
index 68c192d..0000000
--- a/archived/v6.3.0.py
+++ /dev/null
@@ -1,320 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- Star Yuuki Bot - Yuuki
- ~~~~~~~~~~~
- This is a main program in SYB.
- It`s belong to Star Yuuki(pYthon) Bot Project of Star Neptune Bot
- Version: v6.3.0
- Copyright(c) 2017 Star Inc. All Rights Reserved.
-"""
-from api import *
-from api.core.ttypes import Message
-import time, sys
-
-account=''
-password=''
-king=''
-nc=''
-sss=''
-ss=''
-s=''
-
-try:
- syb = LineClient(account,password,refreshCacheDatas=False)
- print 'Login OK'
-except:
- print "Login Failed"
-
-lastrev=0
-errortimes=0
-allerrortimes=0
-botkick=0
-ked=''
-kued=[]
-kced=0
-urljoined=''
-works=[]
-partblock=[]
-partblocknew=0
-
-localtime = time.asctime(time.localtime(time.time()))
-log=open("yuuki-status","a+")
-log.write("
"+localtime+": Start")
-for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
-
-bk=open('.blocklist','r')
-blocklist = syb._getBlockedContactIds()
-for x in eval("[%s]" % (bk.read(),)):
- blocklist.append(x)
-bk=open('.blocklist','a+')
-
-pb=open('.partblock','r')
-for x in eval("[%s]" % (pb.read(),)):
- partblock.append(x)
- blocklist.append(x)
-pb.close()
-
-bt=open('.botlist','r')
-botlist = eval("[%s]" % (bt.read(),))
-bt=open('.botlist','a+')
-
-syb.revision = syb._getLastOpRevision()
-
-def sendMessage(self, toid, msg):
- text = Message(to=toid, text=msg.encode('utf-8'))
- self._sendMessage(text)
-
-def sendUser(self, toid, mid):
- text = Message(contentType=13, text='',contentMetadata={'mid': mid, 'displayName': 'Line User',}, to=toid)
- self._sendMessage(text)
-
-def sybGetGroupCreator(group):
- if group.creator == None:
- contact = group.members[0]
- else:
- contact = group.creator
- return contact
-
-def newSybLog(self, when, logcode, gid, who, whoseid):
- self.write("
%s: %s: %s ->%s :%s" % (when,logcode,gid,who,whoseid))
-
-while True:
- ts=time.asctime( time.localtime(time.time()) )
- if allerrortimes == 29:
- try:
- sendMessage(syb,king,"Safe Mode Start!\nError:\n%s\n%s\n%s" % (err1,err2,err3))
- except:
- syb.login()
- sendMessage(syb,king,"Safe Mode Start!\nError:\n%s\n%s\n%s" % (err1,err2,err3))
- sys.exit(0)
- elif errortimes == 1:
- syb.revision = max(syb.revision,lastrev)
- errortimes = 0
- allerrortimes = allerrortimes +1
- try:
- sendMessage(syb,king,"System Error\nTimes: %s\n\nError:\n%s\n%s\n%s" % (allerrortimes,err1,err2,err3))
- except:
- syb.login()
- sendMessage(syb,king,"System Error\nTimes: %s\n\nError:\n%s\n%s\n%s" % (allerrortimes,err1,err2,err3))
- if allerrortimes != 1:
- time.sleep(60)
- if over != None:
- works.remove(over)
- syb.revision = syb._getLastOpRevision()
- try:
- if works == []:
- ncover = syb._fetchOperations(syb.revision,50)
- else:
- ncover=None
- logcode = None
- glist = None
- over = None
- if ncover != None:
- if ncover != []:
- if ncover[-1].revision == -1:
- lastrev = ncover[-2].revision
- else:
- lastrev = ncover[-1].revision
- for nc in ncover:
- if nc.type == 11 or nc.type == 13 or nc.type == 17 or nc.type == 19:
- works.append(nc)
- if partblocknew == 1:
- pb = open('.partblocklist', 'w')
- pb.write(str(partblock))
- pb.close()
- if time.localtime(time.time()).tm_min == 0:
- for x in partblock:
- blocklist.remove(x)
- pb = open('.partblocklist', 'w')
- pb.close()
- if kced == 2:
- kued = []
- else:
- kced=kced+1
- if works != []:
- over=works[0]
- urljoin=open('../talk/yuuki-join','r')
- uread = urljoin.read()
- if uread != "":
- try:
- if '\n' in uread:
- ouread = uread.replace('\n','')
- else:
- ouread = uread
- gg = syb._client.findGroupByTicket(ouread)
- syb._client.acceptGroupInvitationByTicket(0, gg.id, ouread)
- syb._changeGroupUrlStatus(gg.id, False)
- newSybLog(log, ts, 'Join',over.param1,'Inviter','UrlJoin')
- urljoin.close()
- urljoin=open('../talk/yuuki-join','w')
- except:
- urljoin=open('../talk/yuuki-join','w')
- elif over == None:
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 17:
- kued=[over.param1,over.param2]
- kced=0
- if over.param2 in blocklist:
- syb._client.send_kickoutFromGroup(0,over.param1,[over.param2])
- newSybLog(log, ts, 'Kick',over.param1,'Blocked',over.param2)
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 11:
- if over.param3 == '1':
- gg=syb._getGroup(over.param1)
- if gg.name == 'Yuuki OFF' and syb.profile.id in [x.mid for x in gg.members]:
- if over.param2 != sybGetGroupCreator(gg).mid:
- syb._changeGroupName(over.param1,'No way!')
- else:
- newSybLog(log, ts, 'OFF',over.param1,'Changer',over.param2)
- sendMessage(syb,over.param1,'所有功能已關閉,可放心移除任何成員(包含我QAQQ)')
- if gg.name == 'Yuuki SC' or gg.name == 'SA Kingdom':
- if over.param2 != sybGetGroupCreator(gg).mid and gg.name == 'Yuuki SC':
- syb._changeGroupName(over.param1,'Group`s Admin Only!')
- else:
- ull=syb._renewGroupUrl(over.param1)
- urljoin = open('../talk/sc-join','w')
- syb._changeGroupUrlStatus(over.param1, True)
- urljoin.write(ull)
- urljoin.close()
- newSybLog(log, ts, 'SC',over.param1,'Changer',over.param2)
- urljoined=over.param1
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 19:
- if [over.param1,over.param2] == kued or over.param2 in botlist:
- ogn = 'Yuuki OFF'
- if botkick == 0:
- syb._client.send_kickoutFromGroup(0, over.param1, [over.param2])
- if over.param2 not in botlist:
- bt.write('"%s",' % (over.param2,))
- if over.param2 not in blocklist:
- sendMessage(syb, over.param2, '您目前已被本程序封鎖\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- syb._blockContact(over.param2)
- blocklist.append(over.param2)
- bk.write('"%s",' % (over.param2,))
- newSybLog(log, ts, 'Block',over.param1,'Bot',over.param2)
- botkick=botkick+1
- else:
- botkick=0
- gg=syb._getGroup(over.param1)
- ogn=gg.name
- if ogn == 'Yuuki OFF' or over.param2 == king or over.param2 == nc or over.param2 ==sss or over.param2 == ss or over.param2 == s:
- pass
- else:
- if over.param3 == syb.profile.id:
- if over.param2 not in blocklist:
- sendMessage(syb,over.param2,'您目前已被本程序封鎖\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- syb._blockContact(over.param2)
- blocklist.append(over.param2)
- bk.write('"%s",' % (over.param2,))
- newSybLog(log, ts, 'Block',over.param1,'Blocked',over.param2)
- elif over.param3 == ss:
- if over.param2 not in blocklist:
- sendMessage(syb,over.param2,'您目前已被本程序封鎖\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- syb._blockContact(over.param2)
- blocklist.append(over.param2)
- bk.write('"%s",' % (over.param2,))
- syb._client.send_kickoutFromGroup(0, over.param1, [over.param2])
- ull=syb._renewGroupUrl(over.param1)
- urljoin = open('../talk/sc-join','w')
- syb._changeGroupUrlStatus(over.param1, True)
- urljoin.write(ull)
- urljoin.close()
- newSybLog(log, ts, 'SCBlock',over.param1,'Blocked',over.param2)
- else:
- if syb.profile.id in [x.mid for x in gg.members]:
- sendMessage(syb,over.param1,'如果你是系統認定的群組管理員,請先停用我\nP.S.把群名改成(區分大小寫):Yuuki OFF\n反正,掰掰囉><\nhttp://line.me/ti/p/@niq6886v')
- sendUser(syb,over.param1,over.param2)
- syb._client.send_kickoutFromGroup(0,over.param1,[over.param2])
- sendMessage(syb,over.param1,'被踢者:')
- sendUser(syb,over.param1,over.param3)
- if gg.preventJoinByTicket == False:
- syb._changeGroupUrlStatus(gg.id, False)
- newSybLog(log, ts, 'Kick',over.param1,'Kicker/Kicked','%s/%s' % (over.param2,over.param3,))
- ked=over.param1
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 13:
- inlist = False
- if over.param3 == syb.profile.id:
- inlist = True
- elif "\x1e" in over.param3:
- glist = over.param3.split("\x1e")
- if syb.profile.id in glist:
- inlist = True
- if glist != None or over.param3 in botlist:
- blocked = []
- if glist != None:
- if syb.profile.id not in glist:
- for x in glist:
- if x in botlist:
- blocked=glist
- break
- else:
- blocked=[over.param3]
- if blocked != []:
- inlist = False
- syb._client.send_cancelGroupInvitation(0,over.param1, blocked)
- for x in blocked:syb._client.send_kickoutFromGroup(0,over.param1,[x])
- syb._client.send_kickoutFromGroup(0,over.param1,[over.param2])
- if over.param2 not in blocklist:
- partblock.append(over.param2)
- partblocknew=1
- blocklist.append(over.param2)
- sendMessage(syb,over.param2,'由於您疑似邀請到了惡意解散群組程式\n您目前已被本程序暫時性封鎖\n請耐心等候至整點,名單會自動移除\n\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- newSybLog(log, ts, 'Cancel', over.param1, 'BOT_Inviter', over.param2)
- if inlist == True:
- try:
- gg=syb._getGroup(over.param1)
- if over.param1 == ked:
- pass
- elif len(gg.members) <= 100:
- if king in [x.mid for x in gg.members]:
- for x in gg.members:
- if x.mid == king:
- kingname=x.displayName
- if "✘" not in kingname:
- inlist = False
- else:
- inlist = False
- except:
- inlist=False
- try:
- if syb.profile.id in [x.mid for x in gg.invitee] and inlist == True:
- syb._acceptGroupInvitation(over.param1)
- newSybLog(log, ts, 'Join',over.param1,'Inviter',over.param2)
- sendMessage(syb,over.param1,'安安^^\n我是絕劍呦><\n請多多指教OwO')
- sendMessage(syb,over.param1,'我隸屬於千本桜帝国(TW)呦\n使用說明及最新消息請至\nhttp://line.me/ti/p/@niq6886v\n之主頁瀏覽,謝謝^^\n也歡迎造訪千本桜帝国(TW)官網\nhttp://sa-kingdom.ml/tw\n本群組管理員:\n%s' % (sybGetGroupCreator(gg).displayName,))
- else:
- if syb.profile.id in [x.mid for x in gg.invitee]:
- syb._acceptGroupInvitation(over.param1)
- sendMessage(syb,over.param1,'不好意思...\n此群組人數未滿100人')
- syb._leaveGroup(over.param1)
- newSybLog(log, ts, 'NoJoin',over.param1,'Inviter',over.param2)
- except:
- newSybLog(log, ts, 'NoJoin(E)',over.param1,'Inviter',over.param2)
- if glist != None or over.param3 in blocklist:
- blocked=[]
- if glist != None:
- for x in glist:
- if x in blocklist:
- blocked.append(x)
- else:
- blocked=[over.param3]
- if blocked != []:
- syb._client.send_cancelGroupInvitation(0,over.param1,blocked)
- newSybLog(log, ts, 'Cancel',over.param1,'Blocked',over.param2)
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- else:
- if over != None:
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- except EOFError:
- pass
- except:
- errortimes = errortimes + 1
- err1, err2, err3 = sys.exc_info()
diff --git a/archived/v6.3.1.py b/archived/v6.3.1.py
deleted file mode 100644
index 62c8d38..0000000
--- a/archived/v6.3.1.py
+++ /dev/null
@@ -1,362 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- Star Yuuki Bot - Yuuki
- ~~~~~~~~~~~
- This is a main program in SYB.
- It`s belong to Star Yuuki(pYthon) Bot Project of Star Neptune Bot
- Version: v6.3.1
- Copyright(c) 2017 Star Inc. All Rights Reserved.
-"""
-from api import *
-from api.core.ttypes import Message
-import time, sys
-
-account=''
-password=''
-king=''
-nc=''
-sss=''
-ss=''
-s=''
-
-try:
- syb = LineClient(account,password,refreshCacheDatas=False)
- print 'Login OK'
-except:
- print "Login Failed"
-
-lastrev=0
-errortimes=0
-allerrortimes=0
-botkick=0
-ks=0
-kickban = 45
-ked=''
-kued=[]
-kced=0
-urljoined=''
-works=[]
-partblock=[]
-partblocknew=0
-
-localtime = time.asctime(time.localtime(time.time()))
-log=open("yuuki-status","a+")
-log.write("
"+localtime+": Start")
-for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
-
-lks=open('.kicks','r')
-ks = len(lks.read())
-lks.close()
-lks=open('.kicks','w+')
-
-bk=open('.blocklist','r')
-blocklist = syb._getBlockedContactIds()
-for x in eval("[%s]" % (bk.read(),)):
- blocklist.append(x)
-bk=open('.blocklist','a+')
-
-pb=open('.partblock','r')
-for x in eval("[%s]" % (pb.read(),)):
- partblock.append(x)
- blocklist.append(x)
-pb.close()
-
-bt=open('.botlist','r')
-botlist = eval("[%s]" % (bt.read(),))
-bt=open('.botlist','a+')
-
-syb.revision = syb._getLastOpRevision()
-
-def SNB4sybURL(key='',gid='',url='',gki='',glv=''):
- urlworks = {"key":key,"gid":gid,"gur":url,"gki":gki,"glv":glv}
- urlover = requests.post(' ',urlworks)
- return urlover.text
-
-def sendMessage(self, toid, msg):
- text = Message(to=toid, text=msg.encode('utf-8'))
- self._client.send_sendMessage(0, text)
-
-def sendUser(self, toid, mid):
- text = Message(contentType=13, text='',contentMetadata={'mid': mid, 'displayName': 'Line User',}, to=toid)
- self._client.send_sendMessage(0, text)
-
-def sybGetGroupCreator(group):
- if group.creator == None:
- contact = group.members[0]
- else:
- contact = group.creator
- return contact
-
-def newSybLog(self, when, logcode, gid, who, whoseid):
- self.write("
%s: %s: %s ->%s :%s" % (when,logcode,gid,who,whoseid))
-
-while True:
- ts=time.asctime( time.localtime(time.time()) )
- if allerrortimes == 229:
- try:
- sendMessage(syb,king,"Safe Mode Start!\nError:\n%s\n%s\n%s" % (err1,err2,err3))
- except:
- syb.login()
- sendMessage(syb,king,"Safe Mode Start!\nError:\n%s\n%s\n%s" % (err1,err2,err3))
- sys.exit(0)
- elif errortimes == 1:
- syb.revision = max(syb.revision,lastrev)
- errortimes = 0
- allerrortimes = allerrortimes +1
- try:
- sendMessage(syb,king,"System Error\nTimes: %s\n\nError:\n%s\n%s\n%s" % (allerrortimes,err1,err2,err3))
- except:
- syb.login()
- sendMessage(syb,king,"System Error\nTimes: %s\n\nError:\n%s\n%s\n%s" % (allerrortimes,err1,err2,err3))
- if allerrortimes != 1:
- time.sleep(60)
- if over != None and works != []:
- works.remove(over)
- syb.revision = syb._getLastOpRevision()
- try:
- if works == []:
- ncover = syb._fetchOperations(syb.revision,50)
- else:
- ncover=None
- logcode = None
- glist = None
- over = None
- if ncover != None:
- if ncover != []:
- if ncover[-1].revision == -1:
- lastrev = ncover[-2].revision
- else:
- lastrev = ncover[-1].revision
- for nc in ncover:
- if nc.type == 11 or nc.type == 13 or nc.type == 17 or nc.type == 19:
- works.append(nc)
- if partblocknew == 1:
- pb = open('.partblocklist', 'w')
- pb.write(str(partblock))
- pb.close()
- if time.localtime(time.time()).tm_min == 0:
- if partblock != []:
- for x in partblock:
- blocklist.remove(x)
- partblock = []
- pb = open('.partblocklist', 'w')
- pb.close()
- lks.close()
- ks=0
- lks = open('.kicks', 'w+')
- if kced == 2:
- kued = []
- else:
- kced=kced+1
- if works != []:
- over=works[0]
- urljoin=open('../talk/yuuki-join','r')
- uread = urljoin.read()
- if uread != "":
- try:
- ouread = uread.split('\n')
- syb._client.send_acceptGroupInvitationByTicket(0, ouread[0], ouread[1])
- syb._changeGroupUrlStatus(ouread[0], False)
- newSybLog(log, ts, 'Join',ouread[0],'Inviter','UrlJoin')
- urljoin.close()
- urljoin=open('../talk/yuuki-join','w')
- except:
- urljoin=open('../talk/yuuki-join','w')
- elif over == None:
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 17:
- kued=[over.param1,over.param2]
- kced=0
- if over.param2 in blocklist:
- if ks <= kickban:
- syb._client.send_kickoutFromGroup(0,over.param1,[over.param2])
- ks=ks+1
- lks.write("+")
- else:
- sendMessage(syb,over.param1,'請注意!目前有遭系統封鎖之人員進入!\n程序由於Line Corp.限制\n目前無法踢人!請注意此群組!\nhttp://line.me/ti/p/@niq6886v')
- newSybLog(log, ts, 'Kick',over.param1,'Blocked',over.param2)
- syb._changeGroupUrlStatus(over.param1,False)
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 11:
- if over.param3 == '1':
- gg=syb._getGroup(over.param1)
- if gg.name == 'Yuuki OFF' and syb.profile.id in [x.mid for x in gg.members]:
- if over.param2 != sybGetGroupCreator(gg).mid:
- syb._changeGroupName(over.param1,'No way!')
- else:
- newSybLog(log, ts, 'OFF',over.param1,'Changer',over.param2)
- sendMessage(syb,over.param1,'所有功能已關閉,可放心移除任何成員(包含我QAQQ)')
- if gg.name == 'Yuuki SC' or gg.name == 'SA Kingdom':
- if over.param2 != sybGetGroupCreator(gg).mid and gg.name == 'Yuuki SC':
- syb._changeGroupName(over.param1,'Group`s Admin Only!')
- else:
- ull=syb._renewGroupUrl(over.param1)
- urljoin = open('../talk/sc-join','w')
- syb._changeGroupUrlStatus(over.param1, True)
- urljoin.write(over.param1+"\n"+ull)
- urljoin.close()
- newSybLog(log, ts, 'SC',over.param1,'Changer',over.param2)
- urljoined=over.param1
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 19:
- if [over.param1,over.param2] == kued or over.param2 in botlist:
- ogn = 'Yuuki OFF'
- if botkick == 2:
- if ks <= kickban:
- syb._client.send_kickoutFromGroup(0,over.param1,[over.param2])
- ks=ks+1
- lks.write("+")
- else:
- sendMessage(syb,over.param1,'請注意!目前有新加入者正在移除成員\n程序由於Line Corp.限制\n目前無法踢人!請注意此群組!\nhttp://line.me/ti/p/@niq6886v')
- if over.param2 in partblock:
- partblock.remove(over.param2)
- partblocknew=1
- blocklist.remove(over.param2)
- if over.param2 not in botlist:
- bt.write('"%s",' % (over.param2,))
- if over.param2 not in blocklist:
- sendMessage(syb, over.param2, '您目前已被本程序封鎖\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- syb._blockContact(over.param2)
- blocklist.append(over.param2)
- bk.write('"%s",' % (over.param2,))
- newSybLog(log, ts, 'Block',over.param1,'Bot',over.param2)
- botkick=botkick+1
- else:
- botkick=0
- gg=syb._getGroup(over.param1)
- ogn=gg.name
- if ogn == 'Yuuki OFF' or over.param2 == king or over.param2 == nc or over.param2 ==sss or over.param2 == ss or over.param2 == s:
- pass
- else:
- if over.param3 == syb.profile.id:
- if over.param2 in partblock:
- partblock.remove(over.param2)
- partblocknew=1
- blocklist.remove(over.param2)
- if over.param2 not in blocklist:
- sendMessage(syb,over.param2,'您目前已被本程序封鎖\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- syb._blockContact(over.param2)
- blocklist.append(over.param2)
- bk.write('"%s",' % (over.param2,))
- newSybLog(log, ts, 'Block',over.param1,'Blocked',over.param2)
- elif over.param3 == ss:
- if ks <= kickban:
- syb._client.send_kickoutFromGroup(0,over.param1,[over.param2])
- ks=ks+1
- lks.write("+")
- ull=syb._renewGroupUrl(over.param1)
- urljoin = open('../talk/sc-join','w')
- syb._changeGroupUrlStatus(over.param1, True)
- urljoin.write(over.param1+"\n"+ull)
- urljoin.close()
- if over.param2 in partblock:
- partblock.remove(over.param2)
- partblocknew=1
- blocklist.remove(over.param2)
- if over.param2 not in blocklist:
- sendMessage(syb,over.param2,'您目前已被本程序封鎖\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- syb._blockContact(over.param2)
- blocklist.append(over.param2)
- bk.write('"%s",' % (over.param2,))
- newSybLog(log, ts, 'SCBlock',over.param1,'Blocked',over.param2)
- else:
- if syb.profile.id in [x.mid for x in gg.members]:
- if ks <= kickban:
- sendMessage(syb,over.param1,'如果你是系統認定的群組管理員,請先停用我\nP.S.把群名改成(區分大小寫):Yuuki OFF\n反正,掰掰囉><\nhttp://line.me/ti/p/@niq6886v')
- sendUser(syb,over.param1,over.param2)
- syb._client.send_kickoutFromGroup(0,over.param1,[over.param2])
- ks=ks+1
- lks.write("+")
- sendMessage(syb,over.param1,'被踢者:')
- sendUser(syb,over.param1,over.param3)
- else:
- sendMessage(syb,over.param1,'請注意!目前有人正在移除成員\n程序由於Line Corp.限制\n目前無法踢人!請注意此群組!\nhttp://line.me/ti/p/@niq6886v')
- if gg.preventJoinByTicket == False:
- syb._changeGroupUrlStatus(gg.id, False)
- newSybLog(log, ts, 'Kick',over.param1,'Kicker/Kicked','%s/%s' % (over.param2,over.param3,))
- ked=over.param1
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 13:
- inlist = False
- if over.param3 == syb.profile.id:
- inlist = True
- elif "\x1e" in over.param3:
- glist = over.param3.split("\x1e")
- if syb.profile.id in glist:
- inlist = True
- if glist != None or over.param3 in botlist:
- blocked = []
- if glist != None:
- if syb.profile.id not in glist:
- for x in glist:
- if x in botlist:
- blocked=glist
- break
- else:
- blocked=[over.param3]
- if blocked != []:
- inlist = False
- syb._client.send_cancelGroupInvitation(0,over.param1, blocked)
- if over.param2 not in blocklist:
- partblock.append(over.param2)
- partblocknew=1
- blocklist.append(over.param2)
- sendMessage(syb,over.param2,'由於您疑似邀請到了惡意解散群組程式\n您目前已被本程序暫時性封鎖\n請耐心等候至整點,名單會自動移除\n\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- newSybLog(log, ts, 'Cancel', over.param1, 'BOT_Inviter', over.param2)
- if inlist == True:
- try:
- gg=syb._getGroup(over.param1)
- if over.param1 == ked:
- pass
- elif len(gg.members) <= 100:
- if king in [x.mid for x in gg.members]:
- for x in gg.members:
- if x.mid == king:
- kingname=x.displayName
- if "✘" not in kingname:
- inlist = False
- else:
- inlist = False
- except:
- inlist=False
- try:
- if syb.profile.id in [x.mid for x in gg.invitee] and inlist == True:
- syb._client.send_acceptGroupInvitation(0,over.param1)
- newSybLog(log, ts, 'Join',over.param1,'Inviter',over.param2)
- sendMessage(syb,over.param1,'安安^^\n我是絕劍呦><\n請多多指教OwO')
- sendMessage(syb,over.param1,'我隸屬於千本桜帝国(TW)呦\n使用說明及最新消息請至\nhttp://line.me/ti/p/@niq6886v\n之主頁瀏覽,謝謝^^\n也歡迎造訪千本桜帝国(TW)官網\nhttp://sa-kingdom.ml/tw\n本群組管理員:\n%s' % (sybGetGroupCreator(gg).displayName,))
- else:
- if syb.profile.id in [x.mid for x in gg.invitee]:
- syb._client.send_acceptGroupInvitation(0,over.param1)
- sendMessage(syb,over.param1,'不好意思...\n此群組人數未滿100人')
- syb._client.send_leaveGroup(0,over.param1)
- newSybLog(log, ts, 'NoJoin',over.param1,'Inviter',over.param2)
- except:
- newSybLog(log, ts, 'NoJoin(E)',over.param1,'Inviter',over.param2)
- if glist != None or over.param3 in blocklist:
- blocked=[]
- if glist != None:
- for x in glist:
- if x in blocklist:
- blocked.append(x)
- else:
- blocked=[over.param3]
- if blocked != []:
- syb._client.send_cancelGroupInvitation(0,over.param1,blocked)
- newSybLog(log, ts, 'Cancel',over.param1,'Blocked',over.param2)
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- else:
- if over != None:
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- except EOFError:
- pass
- except:
- errortimes = errortimes + 1
- err1, err2, err3 = sys.exc_info()
diff --git a/archived/v6.3.2.py b/archived/v6.3.2.py
deleted file mode 100644
index 7b21c5d..0000000
--- a/archived/v6.3.2.py
+++ /dev/null
@@ -1,463 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- Star Yuuki Bot - Yuuki
- ~~~~~~~~~~~
- This is a main program in SYB.
- It`s belong to Star Yuuki(pYthon) Bot Project of Star Neptune Bot
- Version: v6.3.2
- Copyright(c) 2017 Star Inc. All Rights Reserved.
-"""
-from api import *
-from api.core.ttypes import Message
-import time, sys, requests
-
-account=''
-password=''
-king=''
-nc=''
-sss=''
-ss=''
-s=''
-forsyb=''
-
-try:
- syb = LineClient(account,password,refreshCacheDatas=False)
- print 'Login OK'
-except:
- print "Login Failed"
-
-lastrev=0
-errortimes=0
-allerrortimes=0
-botkick=0
-ks=0
-kickban = 30
-ked=''
-kedcheck=0
-kked=[]
-kued=[]
-kced=0
-urljoined=''
-works=[]
-partblock=[]
-partblocknew=0
-ksreg=0
-notKick=[]
-
-localtime = time.asctime(time.localtime(time.time()))
-log=open("yuuki-status","a+")
-log.write("
"+localtime+": Start")
-for gi in syb._getGroupIdsInvited():
- syb._acceptGroupInvitation(gi)
- syb._leaveGroup(gi)
-
-authKey=open('../talk/yuuki-join','w')
-authKey.write(syb.authToken)
-authKey.close()
-time.sleep(3)
-authKey=open('../talk/sc-join','r')
-key=authKey.read()
-authKey.close()
-time.sleep(3)
-authKey=open('../../www/star_nep/4syb/.key','r')
-kirito=authKey.read()
-authKey.close()
-
-lk=open('.lastkick','r')
-strlk=lk.read()
-if strlk != '':
- lastkick=int(strlk)
-else:
- lastkick=0
-lk.close()
-
-lks=open('.kicks','r')
-ks = len(lks.read())
-lks.close()
-lks=open('.kicks','w+')
-
-ng=open('.ng','r')
-notKick = ng.read().split("\n")
-ng.close()
-ng=open('.ng','w+')
-
-bk=open('.blocklist','r')
-blocklist = syb._getBlockedContactIds()
-for x in eval("[%s]" % (bk.read(),)):
- blocklist.append(x)
-bk=open('.blocklist','a+')
-
-pb=open('.partblock','r')
-for x in eval("[%s]" % (pb.read(),)):
- partblock.append(x)
- blocklist.append(x)
-pb.close()
-
-bt=open('.botlist','r')
-botlist = eval("[%s]" % (bt.read(),))
-bt=open('.botlist','a+')
-
-syb.revision = syb._getLastOpRevision()
-
-def SNB4sybURL(key='',gid='',url='',gki='',glv=''):
- urlworks = {"key":key,"gid":gid,"gur":url,"gki":gki,"glv":glv}
- urlover = requests.post(' ',urlworks)
- return urlover.text
-
-def changeGroupUrlStatusByData(self, data, status):
- if status == True:
- msg=False
- else:
- msg=True
- message=data
- message.preventJoinByTicket=msg
- message.invitee=None
- message.members=None
- return self._client.send_updateGroup(0, message)
-
-def sendMessage(self, toid, msg):
- text = Message(to=toid, text=msg.encode('utf-8'))
- self._client.send_sendMessage(0, text)
-
-def sendUser(self, toid, mid):
- text = Message(contentType=13, text='',contentMetadata={'mid': mid, 'displayName': 'Line User',}, to=toid)
- self._client.send_sendMessage(0, text)
-
-def sybGetGroupCreator(group):
- if group.creator == None:
- contact = group.members[0]
- else:
- contact = group.creator
- return contact
-
-def newSybLog(self, when, logcode, gid, who, whoseid):
- self.write("
%s: %s: %s ->%s :%s" % (when,logcode,gid,who,whoseid))
-
-while True:
- ts=time.asctime( time.localtime(time.time()) )
- if allerrortimes == 229:
- try:
- sendMessage(syb,king,"Safe Mode Start!\nError:\n%s\n%s\n%s" % (err1,err2,err3))
- except:
- syb.login()
- sendMessage(syb,king,"Safe Mode Start!\nError:\n%s\n%s\n%s" % (err1,err2,err3))
- sys.exit(0)
- elif errortimes == 1:
- syb.revision = max(syb.revision,lastrev)
- errortimes = 0
- allerrortimes = allerrortimes +1
- try:
- sendMessage(syb,king,"System Error\nTimes: %s\n\nError:\n%s\n%s\n%s" % (allerrortimes,err1,err2,err3))
- except:
- syb.login()
- sendMessage(syb,king,"System Error\nTimes: %s\n\nError:\n%s\n%s\n%s" % (allerrortimes,err1,err2,err3))
- if allerrortimes != 1:
- time.sleep(60)
- if over != None and works != []:
- works.remove(over)
- syb.revision = syb._getLastOpRevision()
- try:
- if works == []:
- ncover = syb._fetchOperations(syb.revision,50)
- else:
- ncover=None
- logcode = None
- glist = None
- over = None
- if ncover != None:
- if ncover != []:
- if ncover[-1].revision == -1:
- lastrev = ncover[-2].revision
- else:
- lastrev = ncover[-1].revision
- for nc in ncover:
- if nc.type == 19:
- works.append(nc)
- if kedcheck == 1:
- if over.param2 == sss:
- kedcheck = 0
- elif nc.type == 11 or nc.type == 13 or nc.type == 17:
- works.append(nc)
- if kedcheck == 1:
- kedcheck = 2
- if kedcheck == 2:
- if ks == 0:
- ks = 1
- ksreg = 0
- else:
- ks = 99
- kedcheck = 0
- if partblocknew == 1:
- pb = open('.partblocklist', 'w')
- pb.write(str(partblock))
- pb.close()
- if ks == 1 and ksreg == 0:
- x=time.localtime(time.time()).tm_min
- lk=open('.lastkick','w+')
- lastkick=x
- lk.write(str(x))
- lk.close()
- ksreg=1
- if time.localtime(time.time()).tm_min == lastkick:
- lks.close()
- ksreg=0
- ks=0
- lks = open('.kicks', 'w+')
- if time.localtime(time.time()).tm_min == 0:
- if partblock != []:
- for x in partblock:
- blocklist.remove(x)
- partblock = []
- pb = open('.partblocklist', 'w')
- pb.close()
- notKick=[]
- ng.close()
- ng = open('.ng', 'w+')
- if kced == 5:
- kued = []
- else:
- kced=kced+1
- if works != []:
- over=works[0]
- if over == None:
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 17:
- if over.param2 != forsyb:
- kued=[over.param1,over.param2]
- kced=0
- if over.param2 in blocklist:
- if ks <= kickban:
- syb._client.send_kickoutFromGroup(0,over.param1,[over.param2])
- kedcheck=1
- ks=ks+1
- lks.write("+")
- else:
- sendMessage(syb,over.param1,'請注意!目前有遭系統封鎖之人員進入!\n程序由於Line Corp.限制\n目前無法踢人!請注意此群組!\nhttp://line.me/ti/p/@niq6886v')
- newSybLog(log, ts, 'Kick',over.param1,'Blocked',over.param2)
- syb._changeGroupUrlStatus(over.param1,False)
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 11:
- if over.param3 == '1':
- gg=syb._getGroup(over.param1)
- if gg.name == 'Yuuki OFF' and syb.profile.id in [x.mid for x in gg.members]:
- if over.param2 != sybGetGroupCreator(gg).mid:
- syb._changeGroupName(over.param1,'No way!')
- else:
- newSybLog(log, ts, 'OFF',over.param1,'Changer',over.param2)
- sendMessage(syb,over.param1,'所有功能已關閉,可放心移除任何成員(包含我QAQQ)')
- if gg.name == 'Yuuki SC' or gg.name == 'SA Kingdom':
- if over.param2 != sybGetGroupCreator(gg).mid and gg.name == 'Yuuki SC':
- syb._changeGroupName(over.param1,'Group`s Admin Only!')
- else:
- if gg.preventJoinByTicket == True:
- changeGroupUrlStatusByData(syb,gg,True)
- SNB4sybURL(key=key,gid=over.param1,url=syb._renewGroupUrl(over.param1))
- changeGroupUrlStatusByData(syb,gg,False)
- newSybLog(log, ts, 'SC',over.param1,'Changer',over.param2)
- urljoined=over.param1
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 19:
- if [over.param1,over.param2] == kued or over.param2 in botlist:
- ogn = 'Yuuki OFF'
- if botkick == 2:
- if ks <= kickban:
- syb._client.send_kickoutFromGroup(0,over.param1,[over.param2])
- kedcheck=1
- ks=ks+1
- lks.write("+")
- else:
- BotKickE=BotKickE+1
- if BotKickE == 2:
- if gg.preventJoinByTicket == True:
- changeGroupUrlStatusByData(syb,gg,True)
- SNB4sybURL(key=kirito,gid=over.param1,url=syb._renewGroupUrl(over.param1),glv='yes')
- changeGroupUrlStatusByData(syb,gg,False)
- BotKickE=0
- else:
- sendMessage(syb,over.param1,'請注意!目前有新加入者正在移除成員\n程序由於Line Corp.限制\n目前無法踢人!請注意此群組!\nhttp://line.me/ti/p/@niq6886v')
- if over.param2 in partblock:
- partblock.remove(over.param2)
- partblocknew=1
- blocklist.remove(over.param2)
- if over.param2 not in botlist:
- bt.write('"%s",' % (over.param2,))
- if over.param2 not in blocklist:
- sendMessage(syb, over.param2, '您目前已被本程序封鎖\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- syb._blockContact(over.param2)
- blocklist.append(over.param2)
- bk.write('"%s",' % (over.param2,))
- newSybLog(log, ts, 'Block',over.param1,'Bot',over.param2)
- botkick=botkick+1
- else:
- botkick=0
- gg=syb._getGroup(over.param1)
- ogn=gg.name
- if ogn == 'Yuuki OFF' or over.param2 == king or over.param2 == nc or over.param2 == sss or over.param2 == ss or over.param2 == s or over.param2 == forsyb:
- pass
- else:
- if over.param3 == syb.profile.id:
- if over.param2 in partblock:
- partblock.remove(over.param2)
- partblocknew=1
- blocklist.remove(over.param2)
- if over.param2 not in blocklist:
- sendMessage(syb,over.param2,'您目前已被本程序封鎖\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- syb._blockContact(over.param2)
- blocklist.append(over.param2)
- bk.write('"%s",' % (over.param2,))
- newSybLog(log, ts, 'Block',over.param1,'Blocked',over.param2)
- elif over.param3 == ss:
- if ks <= kickban:
- syb._client.send_kickoutFromGroup(0,over.param1,[over.param2])
- kedcheck=1
- ks=ks+1
- lks.write("+")
- gki=''
- else:
- gki=over.param2
- if gg.preventJoinByTicket == True:
- gg.preventJoinByTicket = False
- changeGroupUrlStatusByData(syb,gg,True)
- SNB4sybURL(key=key,gid=over.param1,url=syb._renewGroupUrl(over.param1),gki=gki)
- if over.param2 in partblock:
- partblock.remove(over.param2)
- partblocknew=1
- blocklist.remove(over.param2)
- if over.param2 not in blocklist:
- sendMessage(syb,over.param2,'您目前已被本程序封鎖\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- syb._blockContact(over.param2)
- blocklist.append(over.param2)
- bk.write('"%s",' % (over.param2,))
- newSybLog(log, ts, 'SCBlock',over.param1,'Blocked',over.param2)
- else:
- if syb.profile.id in [x.mid for x in gg.members]:
- if ks <= kickban:
- sendMessage(syb,over.param1,'如果你是系統認定的群組管理員,請先停用我\nP.S.把群名改成(區分大小寫):Yuuki OFF\n反正,掰掰囉><\nhttp://line.me/ti/p/@niq6886v')
- sendUser(syb,over.param1,over.param2)
- syb._client.send_kickoutFromGroup(0,over.param1,[over.param2])
- kedcheck=1
- ks=ks+1
- lks.write("+")
- sendMessage(syb,over.param1,'被踢者:')
- sendUser(syb,over.param1,over.param3)
- else:
- sendMessage(syb,over.param1,'請注意!目前有人正在移除成員\n程序由於Line Corp.限制\n目前無法踢人!請注意此群組!\nhttp://line.me/ti/p/@niq6886v')
- if [over.param1,over.param2] != kked:
- sendMessage(syb,over.param1,'以下分別為:\n踢人者/被踢者')
- sendUser(syb,over.param1,over.param2)
- sendUser(syb,over.param1,over.param3)
- else:
- sendMessage(syb,over.param1,'以下為被踢者')
- sendUser(syb,over.param1,over.param3)
- notKick.append(over.param1)
- ng.write(over.param1+'\n')
- inElist=0
- for x in notKick:
- if x == over.param1:
- inElist=inElist+1
- if inElist == 10:
- if gg.preventJoinByTicket == True:
- gg.preventJoinByTicket = False
- changeGroupUrlStatusByData(syb,gg,True)
- sendMessage(syb,over.param1,'警戒!目前此群組已進入管制模式\n嚴禁執行任何有關成員名單更變之動作\nP.S.整點時解除\nhttp://line.me/ti/p/@niq6886v')
- SNB4sybURL(key=kirito,gid=over.param1,url=syb._renewGroupUrl(over.param1),gki=over.param2,glv='yes')
- sendMessage(syb,over.param2,'此功能尚未啟用...\nhttp://line.me/ti/p/@niq6886v')
- if over.param2 not in blocklist:
- sendMessage(syb,over.param2,'您目前已被本程序封鎖\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- syb._blockContact(over.param2)
- blocklist.append(over.param2)
- bk.write('"%s",' % (over.param2,))
- newSybLog(log, ts, 'Block',over.param1,'Warning',over.param2)
- for x in notKick:
- if x == over.param1:
- notKick.remove(x)
- elif inElist == 5:
- sendMessage(syb,over.param1,'警告!目前此群組即將進入管制模式\n將嚴禁任何人員踢人、邀請等相關動作\n請勿再嘗試剔除任何成員\nhttp://line.me/ti/p/@niq6886v')
- if gg.preventJoinByTicket == False:
- changeGroupUrlStatusByData(syb,gg,False)
- newSybLog(log, ts, 'Kick',over.param1,'Kicker/Kicked','%s/%s' % (over.param2,over.param3,))
- ked=over.param1
- kked=[over.param1,over.param2]
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- elif over.type == 13:
- inlist = False
- if over.param3 == syb.profile.id:
- inlist = True
- elif "\x1e" in over.param3:
- glist = over.param3.split("\x1e")
- if syb.profile.id in glist:
- inlist = True
- if glist != None or over.param3 in botlist:
- blocked = []
- if glist != None:
- if syb.profile.id not in glist:
- for x in glist:
- if x in botlist:
- blocked=glist
- break
- else:
- blocked=[over.param3]
- if blocked != []:
- inlist = False
- syb._client.send_cancelGroupInvitation(0,over.param1, blocked)
- if over.param2 not in blocklist:
- partblock.append(over.param2)
- partblocknew=1
- blocklist.append(over.param2)
- sendMessage(syb,over.param2,'由於您疑似邀請到了惡意解散群組程式\n您目前已被本程序暫時性封鎖\n請耐心等候至整點,名單會自動移除\n\n如有任何問題,請洽詢\nhttp://line.me/ti/p/@niq6886v')
- newSybLog(log, ts, 'Cancel', over.param1, 'BOT_Inviter', over.param2)
- if inlist == True:
- try:
- gg=syb._getGroup(over.param1)
- if over.param1 == ked:
- pass
- elif len(gg.members) <= 100:
- if king in [x.mid for x in gg.members]:
- for x in gg.members:
- if x.mid == king:
- kingname=x.displayName
- if "✘" not in kingname:
- inlist = False
- else:
- inlist = False
- except:
- inlist=False
- try:
- if syb.profile.id in [x.mid for x in gg.invitee] and inlist == True:
- syb._client.send_acceptGroupInvitation(0,over.param1)
- newSybLog(log, ts, 'Join',over.param1,'Inviter',over.param2)
- sendMessage(syb,over.param1,'安安^^\n我是絕劍呦><\n請多多指教OwO')
- sendMessage(syb,over.param1,'我隸屬於千本桜帝国(TW)呦\n使用說明及最新消息請至\nhttp://line.me/ti/p/@niq6886v\n之主頁瀏覽,謝謝^^\n也歡迎造訪千本桜帝国(TW)官網\nhttp://sa-kingdom.ml/tw\n本群組管理員:\n%s' % (sybGetGroupCreator(gg).displayName,))
- else:
- if syb.profile.id in [x.mid for x in gg.invitee]:
- syb._client.send_acceptGroupInvitation(0,over.param1)
- sendMessage(syb,over.param1,'不好意思...\n此群組人數未滿100人')
- syb._client.send_leaveGroup(0,over.param1)
- newSybLog(log, ts, 'NoJoin',over.param1,'Inviter',over.param2)
- except:
- newSybLog(log, ts, 'NoJoin(E)',over.param1,'Inviter',over.param2)
- if glist != None or over.param3 in blocklist:
- blocked=[]
- if glist != None:
- for x in glist:
- if x in blocklist:
- blocked.append(x)
- else:
- blocked=[over.param3]
- if blocked != []:
- syb._client.send_cancelGroupInvitation(0,over.param1,blocked)
- newSybLog(log, ts, 'Cancel',over.param1,'Blocked',over.param2)
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- else:
- if over != None:
- works.remove(over)
- syb.revision = max(syb.revision,lastrev)
- except EOFError:
- pass
- except:
- errortimes = errortimes + 1
- err1, err2, err3 = sys.exc_info()
diff --git a/docs/Configure.md b/docs/Configure.md
deleted file mode 100644
index 4087960..0000000
--- a/docs/Configure.md
+++ /dev/null
@@ -1,109 +0,0 @@
-> :warning: Warning
->
-> Due to protect the talk service of LINE, the software **never** provides any login method, for raising the development threshold.
->
-> If you are the developer, we hope you have the sincere spirit only, for improving the Internet, and respect for their hard. :pray:
-
-## Preparing
-
-+ Copying `config.yaml` from `config.sample.yaml`
-
-+ Following the [guide](#configuring), configure your settings and environment in `config.yaml`.
-
-## Configuring
-
-Star Yuuki BOT never provides any login method for connecting LINE talk service, you need to collect the information required, for continuing.
-
-The config file format is [YAML](https://yaml.org), please understanding the syntax, documents, tutorials, and how to write that for configuring.
-
-### Sample Config File
-
-This is the required information to boot the software for working correctly, and optional settings can be set by override as `config.py` listed.
-
-```yaml
-# Sample Config File for star_yuuki_bot
-# Please replace setting options from `libs/config.py`
-
-Yuuki:
- SecurityService: True
- Default_Language: en
-
-LINE:
- Server:
- Host: https://example.com
- Command_Path: /example_path
- LongPoll_path: /example_path
-
- Account:
- X-Line-Application: LINE_Application_Identification
- X-Line-Access: LINE_Application_AccessKey
- User-Agent: LINE_Application_User-Agent
-```
-
-Please make sure all of information above are filled correctly.
-
-### Optional Settings
-
-The guide will lead you to override the settings of `config.py`.
-
-The config file is separated as two major parts, [`Yuuki`](#Yuuki) and [`LINE`](#LINE).
-
-#### Yuuki
-
-| In `config.py` | Converting to `config.yaml` |
-|---|---|
-| systemConfig | Yuuki |
-
-The part is used for configuring how the software works and computes.
-
-Taking the optional setting, `Advanced`, for example, it belongs to `systemConfig -> Advanced` as `Python dict` default in `config.py`.
-
-So if you hope to set the option to `True`, according the converting table, the config file should be
-
-```yaml
-Yuuki:
- Advanced: True
-```
-
-The feature, `Advanced`, will be active as you set.
-
-As the result, the new config file will be
-
-```yaml
-Yuuki:
- SecurityService: True
- Default_Language: en
- Advanced: True
-
-LINE:
- Server:
- Host: https://example.com
- Command_Path: /example_path
- LongPoll_path: /example_path
-
- Account:
- X-Line-Application: LINE_Application_Identification
- X-Line-Access: LINE_Application_AccessKey
- User-Agent: LINE_Application_User-Agent
-```
-
-That is the way to config the software correctly without any programming modification.
-
-#### LINE
-
-| In `config.py` | Converting to `config.yaml` |
-|---|---|
-| connectInfo | LINE -> Server |
-| connectHeader | LINE -> Account |
-
-- X-Line-Application: `LINE_Application_Identification` means the Product ID for LINE server to identify the client.
-- X-Line-Access: `LINE_Application_AccessKey` as known as an access token of LINE user.
-- User-Agent: `LINE_Application_User-Agent` is the field to be used as HTTP header to connect LINE server.
-
-These are the required config for connecting LINE server, that you should collect them by yourself.
-
-As the guide part [`Yuuki`](#Yuuki) did, overriding settings as needing.
-
-## Next
-
-If you are ready, let's [run it up](https://github.com/star-inc/star_yuuki_bot/wiki/Execute-and-Maintain)!
\ No newline at end of file
diff --git a/docs/Execute-and-Maintain.md b/docs/Execute-and-Maintain.md
deleted file mode 100644
index 9ea6111..0000000
--- a/docs/Execute-and-Maintain.md
+++ /dev/null
@@ -1,35 +0,0 @@
-> Hey! Developer! 🙌
->
-> This is the last step for you to execute the software! 👋
->
-> After the guide, if you have anything interested else, welcome to visit [our team blog](https://snb.starinc.xyz) to get more information!
-
-## Install the dependencies
-
-To install the modules the software required, just need to type
-
- pip install -Ur requirements.txt
-
-The command will install its requirements automatically.
-
-## Execute
-
-It's simple that you have only a command to do
-
- python main.py
-
-If the configuration have no fault, [Star Yuuki BOT](https://line.starinc.xyz/star-yuuki-bot) will boot successfully!
-
-## Maintain
-
-You may do some programming modification, for extending some feature by creating on your own, but `Star Yuuki BOT` while suffering a major updated, it might be making you annoyed.
-
-Please trying to good use of [`git diff`](https://git-scm.com/docs/git-diff) or something similar, for comparing between the new one and the one you edited, merging the best snippets to you product.
-
-The software built-in a feature, checking the update automatically, will check `git` while booting everytime!
-
-You may turn it off, but doing version control is necessary to a service for ensuring it stability.
-
-Last but not least, DO NOT MAKE THE SOFTWARE AS `SELF BOT`, it is not acceptable, some features will not work, and may damage your account.
-
-> Thanks for your using, developing, even contributing!
diff --git a/docs/Get-Started.md b/docs/Get-Started.md
deleted file mode 100644
index 25222a2..0000000
--- a/docs/Get-Started.md
+++ /dev/null
@@ -1,33 +0,0 @@
-Hey! Are you a new developer for LINE Unofficial Engineering?
-Due to LINE Messenger API having a lot of restricts, we choose this way to create the security services for LINE.
-
-You must understand that you will have the risk because you are using an unofficial method to connect their server.
-You may receive `warning`, `request`, `ban`, even `legal action` from LINE Corporation while you taking too far.
-
-Anyway, welcome to join us. Let's improving the Internet experience for public!
-
-## History
-
-[Star Yuuki BOT](https://line.starinc.xyz/star-yuuki-bot/) was a commerce service in the past, end in 2017.
-
-Since 2018, the source code has been released on [GitHub](https://github.com/star-inc/star_yuuki_bot) as an OSS.
-
-2019, the software was rewritten base on [`NightCrazy`](https://www.facebook.com/star.nightcrazy/) programming structure and improving its performance.
-
-## Start Development
-
-Before beginning, you should read all of the [Technical Information](https://github.com/star-inc/star_yuuki_bot/wiki/Technical-Information) and [Setup Environment](https://github.com/star-inc/star_yuuki_bot/wiki/Setup-Environment) at first.
-
-Generally, the software is compatible with the latest version of `Python 3` on any `Unix-like` system.
-
-If you're suffering anything strange, Yuuki `v6.5` is designed by `Python 3.7`, please install it instead and checking your runtime environment sure.
-
-### Get Source Code
-
- git clone https://github.com/star-inc/star_yuuki_bot.git
-
-### Next
-
-[Configure](https://github.com/star-inc/star_yuuki_bot/wiki/Configure)
-
-[Execute and Maintain](https://github.com/star-inc/star_yuuki_bot/wiki/Execute-and-Maintain)
\ No newline at end of file
diff --git a/docs/Home.md b/docs/Home.md
deleted file mode 100644
index 26c0fed..0000000
--- a/docs/Home.md
+++ /dev/null
@@ -1,7 +0,0 @@
-This is the developer documentation for Star Yuuki BOT.
-
-Originally, these documents will should be placed at the [Developer Center of Star Inc.](https://developer.starinc.xyz), but we confused that Star Yuuki BOT is an opensource software, which is one of the repositories on GitHub, the documents should be freedom and could be modify by its community, eventually, we upload them to GitHub Wiki.
-
-Anyway, welcome for choosing the perfectest LINE Group Protective BOT as your helper in your life. :smiley:
-
-[**Get Started**](https://github.com/star-inc/star_yuuki_bot/wiki/Get-Started)
\ No newline at end of file
diff --git a/docs/Menu.md b/docs/Menu.md
deleted file mode 100644
index 6b9b46c..0000000
--- a/docs/Menu.md
+++ /dev/null
@@ -1,11 +0,0 @@
-> Are you new from here? ✋
->
-> Please read all of [Get Started](https://github.com/star-inc/star_yuuki_bot/wiki/Get-Started) first. 🙏
-
-+ [Setup Environment](https://github.com/star-inc/star_yuuki_bot/wiki/Setup-Environment)
-
-+ [Configure](https://github.com/star-inc/star_yuuki_bot/wiki/Configure)
-
-+ [Execute and Maintain](https://github.com/star-inc/star_yuuki_bot/wiki/Execute-and-Maintain)
-
-+ [Technical Information](https://github.com/star-inc/star_yuuki_bot/wiki/Technical-Information)
diff --git a/docs/Setup-Environment.md b/docs/Setup-Environment.md
deleted file mode 100644
index d65933e..0000000
--- a/docs/Setup-Environment.md
+++ /dev/null
@@ -1,5 +0,0 @@
-+ Check your system environment
-
- - According to our test, the software is incompatible with `Microsoft Windows`.
- - We recommend to choosing `Python 3.7` as the runtime environment for executing.
- - Please install `pip` and `git`.
diff --git a/docs/Technical-Information.md b/docs/Technical-Information.md
deleted file mode 100644
index 54f84bd..0000000
--- a/docs/Technical-Information.md
+++ /dev/null
@@ -1,26 +0,0 @@
-Star Yuuki BOT is the software to deploy an automated management service of group for [LINE](http://line.me) platform via their private API with `Apache Thrift Compact Protocol`.
-
-The new programming structure since the version `v6.5` is based on `NightCrazy`, supporting multiprocessing, and getting flexiable for extending.
-
-There are two modes, choosing the compatible one for your environment.
-
-- [Legacy](#legacy-mode) is used for some old or performance losing devices.
-- [Advanced](#advanced-mode) will enable multiprocessing for improving the compute speed.
-
-To configure the mode for executing, please read [`Configure`](https://github.com/star-inc/star_yuuki_bot/wiki/Configure) for getting how to set it up.
-
-## Legacy Mode
-
-The mode takes only one thread for running, and [WebAmin](https://github.com/star-inc/star_yuuki_bot#webadmin) or any extra features will be shutdown automatically, no matter if you already turn them on.
-
-### Flow Chart
-
-![Legacy Mode](https://line.starinc.xyz/wp-content/uploads/2020/11/Legacy.png)
-
-## Advanced Mode
-
-This is used as multiprocessing support for improving performance while computing, and provides some extra features.
-
-### Flow Chart
-
-![Advanced Mode](https://line.starinc.xyz/wp-content/uploads/2020/11/Advanced.png)
diff --git a/docs/_Footer.md b/docs/_Footer.md
deleted file mode 100644
index 8744635..0000000
--- a/docs/_Footer.md
+++ /dev/null
@@ -1 +0,0 @@
-(c) 2020 [Star Inc.](https://starinc.xyz) with its contributors.
\ No newline at end of file
diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md
deleted file mode 100644
index dee1610..0000000
--- a/docs/_Sidebar.md
+++ /dev/null
@@ -1,2 +0,0 @@
-Hey, are you finding the menu?
-[Click Me](https://github.com/star-inc/star_yuuki_bot/wiki/Menu)
\ No newline at end of file
diff --git a/libs/data.py b/libs/data.py
deleted file mode 100644
index 8a9a30a..0000000
--- a/libs/data.py
+++ /dev/null
@@ -1,262 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
-Yuuki_Libs
-(c) 2020 Star Inc.
-This Source Code Form is subject to the terms of the Mozilla Public
-License, v. 2.0. If a copy of the MPL was not distributed with this
-file, You can obtain one at http://mozilla.org/MPL/2.0/.
-"""
-import json
-import os
-import random
-import time
-
-from tornado.httpclient import HTTPClient, HTTPRequest
-from yuuki_core.ttypes import OpType
-
-from .mds import PythonMDS
-from .thread import Yuuki_Multiprocess
-from .thread import Yuuki_Thread
-
-
-class Yuuki_Data:
- # Data Struct Define
-
- Data = {}
-
- DataType = {
- "Global": {
- "LastResetLimitTime": None,
- },
- "Group": {},
- "LimitInfo": {},
- "BlackList": []
- }
-
- GroupType = {
- "SEGroup": None,
- "Ext_Admin": [],
- "GroupTicket": {}
- }
-
- LimitType = {
- "KickLimit": {},
- "CancelLimit": {}
- }
-
- SEGrouptype = {
- OpType.NOTIFIED_UPDATE_GROUP: False,
- OpType.NOTIFIED_INVITE_INTO_GROUP: False,
- OpType.NOTIFIED_ACCEPT_GROUP_INVITATION: False,
- OpType.NOTIFIED_KICKOUT_FROM_GROUP: False
- }
-
- DataPath = "data/"
- DataName = "{}.json"
-
- # Log Struct Define
-
- LogType = {
- "JoinGroup": "