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, ())
评论列表
文章目录