mydealz.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:Abb1t 作者: k-freeman 项目源码 文件源码
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, ())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号