コード例 #1
0
async def diary_integer_error(context, start, end):
    await context.send(m_const.INTEGER_MESSAGE_FOR_DIARY)
    raise m_error.InputMoodError(m_const.INTEGER_MESSAGE_FOR_DIARY,
                                 [start, end])
コード例 #2
0
async def diary_range_error(context, start, end, number_of_entries):
    out_of_diary_range_message_full = m_const.OUT_OF_DIARY_RANGE_MESSAGE % str(
        number_of_entries)
    await context.send(out_of_diary_range_message_full)
    raise m_error.InputMoodError(out_of_diary_range_message_full, [start, end])
コード例 #3
0
async def mood_type_error(context, mood):
    await context.send(m_const.MOOD_TYPE_ERROR_MESSAGE)
    raise m_error.InputMoodError(m_const.MOOD_TYPE_ERROR_MESSAGE, mood)
コード例 #4
0
async def rating_error(context, mood_rating):
    await context.send(m_const.RATING_ERROR_MESSAGE)
    raise m_error.InputMoodError(m_const.RATING_ERROR_MESSAGE, mood_rating)
コード例 #5
0
async def auto_checker_error(context, power_switch_input):
    await context.send(m_const.AUTO_CHECK_INPUT_ERROR_MESSAGE)
    raise m_error.InputMoodError(m_const.AUTO_CHECK_INPUT_ERROR_MESSAGE,
                                 power_switch_input)
コード例 #6
0
async def time_not_there_error(context, mood_times, time_input):
    no_time_phrase = m_const.NO_TIME_ERROR_MESSAGE + str(mood_times)
    await context.send(no_time_phrase)
    raise m_error.InputMoodError(no_time_phrase, time_input)
コード例 #7
0
async def duplicate_time_error(context, time_input):
    await context.send(m_const.TIME_DUPLICATE_ERROR_MESSAGE)
    raise m_error.InputMoodError(m_const.TIME_DUPLICATE_ERROR_MESSAGE,
                                 time_input)
コード例 #8
0
async def time_format_error(context, time_input):
    await context.send(m_const.TIME_FORMAT_ERROR_MESSAGE)
    raise m_error.InputMoodError(m_const.TIME_FORMAT_ERROR_MESSAGE, time_input)
コード例 #9
0
async def day_format_error(context, day_input):
    await context.send(m_const.DAY_FORMAT_ERROR_MESSAGE)
    raise m_error.InputMoodError(m_const.DAY_FORMAT_ERROR_MESSAGE, day_input)