def getNotDeadlineAssignmentMessage(): assignment = assignment_notify_mgr.getNotDeadlineAssignmentList() assignment_str = assignment_notify.parseAssignmentList(assignment) if assignment_str == "": return "" else: return assignment_str
def getTommorowAssignmentMessage(): tommorow_assignment = assignment_notify_mgr.getTommorowAssignmentList() assignment_str = assignment_notify.parseAssignmentList(tommorow_assignment) if assignment_str == "": return "" else: message = assignment_str return message
def update_assignment_list(): new_assignment = init.assignment_notify_mgr.updateAssignmentList() init.bot.postMessage(dev_channel_name, "new assignment: " + str(new_assignment)) if len(new_assignment) != 0: msg = "新しく課題が追加されたよ!\n" msg += assignment_notify.parseAssignmentList(new_assignment) init.bot.postMessage(dev_channel_name, msg)
def all_assignment(message): print("課題の一覧を聞かれました") msg = assignment_notify.parseAssignmentList( init.assignment_notify_mgr.assignment_list.list) if msg == "": message.reply("課題は無いよ") else: message.reply(msg)
def getNextWeekAssignmentMessage(): assignment = assignment_notify_mgr.getNextWeekAssignmentList() assignment_str = assignment_notify.parseAssignmentList(assignment) message = "来週の課題をお知らせするよ!\n" if assignment_str == "": message += "来週の課題はないよ!やったね!" else: message += assignment_str return message
def getTommorowAssignmentMessage(): tommorow_assignment = assignment_notify_mgr.getTommorowAssignmentList() assignment_str = assignment_notify.parseAssignmentList(tommorow_assignment) message = "明日の課題をお知らせするよ!\n" if assignment_str == "": message += "明日の課題は無いよ!やったね!" else: message += assignment_str return message
def updateAssignmentList(message): new_assignment = init.assignment_notify_mgr.updateAssignmentList() msg = "更新したよ!\n" if len(new_assignment) == 0: msg += "新しく追加された課題は無いよ" else: msg += "新しく追加された課題は以下だよ\n" msg += assignment_notify.parseAssignmentList(new_assignment) message.reply(msg)