def execute_v2(qqbot_port, qqbot_num, qqbot_mailauth): if not os.path.exists(QRCODE_PATH + qqbot_port): os.system('mkdir ' + QRCODE_PATH + qqbot_port) bot.Login(['-p', qqbot_port, '-b', QRCODE_PATH+qqbot_port, \ '-r', '-q', qqbot_num, \ '-m', qqbot_num+'@qq.com', '-mc', qqbot_mailauth, \ '-dm']) bot.Plug('receiveQQGroupMessage') bot.Run()
def execute(self, contact, member): from qqbot import _bot as bot try: if self.option == 'on': bot.Plug(self.plug) return self.plug + ' is running...' elif self.option == 'off': bot.Unplug(self.plug) return self.plug + ' is stop now' except: return 'plug %s not find' % self.plug
def main(): init() # # 登录 bot.Login(['-r', '-q', '1821367759']) # 插件 bot.Plug("plugin") # 主循环 bot.Run() return
def execute(): bot.Login() bot.Plug('receiveQQGroupMessage') bot.Run()
# -*- coding: utf-8 -*- from qqbot import _bot as bot import plug if __name__ == '__main__': bot.Login() bot.conf.Display() bot.Plug('plug') bot.Run()