0
試圖使用Willie的作業調度程序到bot.say('Hello world!')
每2秒一次......不知道我是否做錯了某些事情,或者如果Job()
和JobSchedular()
不是我的意思公共api的。Willie Bot Job()和JobSchedular()AttributeError
http://willie.dftba.net/docs/#willie.bot.Willie.JobScheduler
我得到AttributeError: 'function' object has no attribute 'thread'
從bob.run()
:
def dunno(bot):
bot.say('Hello, world!')
@willie.module.commands('try')
def run_it(bot, trigger):
bot.say('trying')
jobb = bot.Job(2, dunno)
bob = bot.JobScheduler(bot)
bob.add_job(jobb)
bob.run()