Esempio n. 1
0
def getNotDeadlineAssignmentMessage():
    assignment = assignment_notify_mgr.getNotDeadlineAssignmentList()
    assignment_str = assignment_notify.parseAssignmentList(assignment)
    if assignment_str == "":
        return ""
    else:
        return assignment_str
Esempio n. 2
0
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
Esempio n. 3
0
 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)
Esempio n. 4
0
def all_assignment(message):
    print("課題の一覧を聞かれました")
    msg = assignment_notify.parseAssignmentList(
        init.assignment_notify_mgr.assignment_list.list)
    if msg == "":
        message.reply("課題は無いよ")
    else:
        message.reply(msg)
Esempio n. 5
0
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
Esempio n. 6
0
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
Esempio n. 7
0
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)