def __init__(self, bot):
self.bot = bot.bot
self.description = r"""*/mydealz* - toggle to get freebie notifications, use */mydealztemp* to define a minimum heat of deals"""
self.queue_in = Queue()
self.chat_ids = []
self.sent_already = [time.time()]
self.freebies = []
try:
os.mkdir("mydealz")
except OSError:
pass #dir exists.
self.filename = "./mydealz/mydealz_chat_ids"
try:
with open(self.filename) as f:
chat_ids=f.read()
if chat_ids:
self.chat_ids=[int(chat_id) for chat_id in chat_ids.split(",")]
except FileNotFoundError:
pass
thread.start_new_thread(self.run, ())
thread.start_new_thread(self.update, ())
评论列表
文章目录