bday.py 文件源码

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

项目:Abb1t 作者: k-freeman 项目源码 文件源码
def __init__(self, bot):
        self.bot = bot.bot
        self.description = r"*/bday* (insert|remove) _<name>_ _<dd.mm>_ - Add or remove a person to the daily birthday reminder _(removing not implemented yet)_"
        self.queue_in = Queue()
        self.data_dir = 'bdays'
        self.chat_ids = []

        # runs for the first time
        if not os.path.exists(self.data_dir):
            os.makedirs(self.data_dir)
        if not os.path.exists(os.path.join(self.data_dir, "chat_ids.txt")):
            open(os.path.join(self.data_dir, "chat_ids.txt"), 'a').close()

        # load previously contacted chats
        self.load_chat_ids_bday()

        thread.start_new_thread(self.run, ())
        thread.start_new_thread(self.happy_birthday, ())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号