コード例 #1
0
    def on_enter_rand_diff_normal(self, event):
        print("Entering n")
        reply_token = event.reply_token

        for count, m in enumerate(MListInfo):
            level = m[3][0]
            if level == "7":
                ns7List.append([m[0], m[3][0], m[3][1]])
                ns57List.append([m[0], m[3][0], m[3][1]])
            elif level == "6":
                ns57List.append([m[0], m[3][0], m[3][1]])
            elif level == "5":
                ns57List.append([m[0], m[3][0], m[3][1]])
                ns15List.append([m[0], m[3][0], m[3][1]])
            else:
                ns15List.append([m[0], m[3][0], m[3][1]])

        bMsg = TMsg(alt_text='Button',
                    template=ButtonsTemplate(
                        thumbnail_image_url="https://i.imgur.com/vWbUSUf.png",
                        title="★数を選べるドン!♪",
                        text="Please Select level to choose from.",
                        actions=[
                            MsgAction(label="★7", text="s7"),
                            MsgAction(label="★5~7", text="s57"),
                            MsgAction(label="★1~5", text="s15")
                        ]))
        send_button_message(reply_token, bMsg)
コード例 #2
0
    def on_enter_rand_diff_oni(self, event):
        print("I'm entering oni")

        for count, m in enumerate(MListInfo):

            level = m[5][0]
            if level == "10":
                os10List.append([m[0], m[5][0], m[5][1]])
            elif level == "9":
                os89List.append([m[0], m[5][0], m[5][1]])
            elif level == "8":
                os68List.append([m[0], m[5][0], m[5][1]])
                os89List.append([m[0], m[5][0], m[5][1]])
            elif level == "7":
                os68List.append([m[0], m[5][0], m[5][1]])
            elif level == "6":
                os68List.append([m[0], m[5][0], m[5][1]])
                os16List.append([m[0], m[5][0], m[5][1]])
            else:
                os16List.append([m[0], m[5][0], m[5][1]])

            # Possibly some ura sheets
            if m[6] != "no_exist":
                level = m[6][0]
                if level == "10":
                    os10List.append([m[0], m[6][0], m[6][1], "ura"])
                elif level == "9":
                    os89List.append([m[0], m[6][0], m[6][1], "ura"])
                elif level == "8":
                    os68List.append([m[0], m[6][0], m[6][1], "ura"])
                    os89List.append([m[0], m[6][0], m[6][1], "ura"])
                elif level == "7":
                    os68List.append([m[0], m[6][0], m[6][1], "ura"])
                elif level == "6":
                    os68List.append([m[0], m[6][0], m[6][1], "ura"])
                    os16List.append([m[0], m[6][0], m[6][1], "ura"])
                else:
                    os16List.append([m[0], m[6][0], m[6][1], "ura"])

        reply_token = event.reply_token
        bMsg = TMsg(alt_text='Button',
                    template=ButtonsTemplate(
                        thumbnail_image_url="https://i.imgur.com/vWbUSUf.png",
                        title="★数を選べるドン!♪",
                        text="Please Select level to choose from.",
                        actions=[
                            MsgAction(label="★10", text="s10"),
                            MsgAction(label="★8~9", text="s89"),
                            MsgAction(label="★6~8", text="s68"),
                            MsgAction(label="★1~6", text="s16")
                        ]))
        send_button_message(reply_token, bMsg)
コード例 #3
0
 def on_enter_rand_diff(self, event):
     print("I'm entering rand_diff")
     reply_token = event.reply_token
     bMsg = TMsg(alt_text='Button',
                 template=ButtonsTemplate(
                     thumbnail_image_url="https://i.imgur.com/vWbUSUf.png",
                     title="難しさを選べるドン!♪",
                     text="Please Select Difficuility.",
                     actions=[
                         MsgAction(label="かんたん", text="easy"),
                         MsgAction(label="ふつう", text="normal"),
                         MsgAction(label="むずかしい", text="hard"),
                         MsgAction(label="おに", text="oni")
                     ]))
     send_button_message(reply_token, bMsg)
コード例 #4
0
    def on_enter_entry(self, event):
        print("Entering entry")
        reply_token = event.reply_token

        # Refetch info from wiki
        MListInfo = wrapWikiInfo()

        # Clear all lists
        os10List.clear()
        os89List.clear()
        os68List.clear()
        os16List.clear()
        hs8List.clear()
        hs78List.clear()
        hs57List.clear()
        hs15List.clear()
        ns7List.clear()
        ns57List.clear()
        ns15List.clear()
        es15List.clear()

        # Send starting msg after fetch
        bMsg = TMsg(alt_text='Button',
                    template=ButtonsTemplate(
                        thumbnail_image_url="https://i.imgur.com/vWbUSUf.png",
                        title="何する?",
                        text="What do you want?",
                        actions=[MsgAction(label="ランダムで曲を選ぶ", text="random")]))
        send_button_message(reply_token, bMsg)
コード例 #5
0
    def on_enter_rand_easyA(self, event):
        print("I'm entering normalA")
        reply_token = event.reply_token
        global sheetURL

        chosenMInfo = random.choice(es15List)
        MusicTitle = "★" + chosenMInfo[1] + "  " + chosenMInfo[0]
        sheetURL = wrapImage(chosenMInfo[2], False)

        bMsg = TMsg(alt_text='Button',
                    template=ButtonsTemplate(
                        thumbnail_image_url="https://i.imgur.com/vWbUSUf.png",
                        title=MusicTitle,
                        text="Please Select level to choose from.",
                        actions=[
                            MsgAction(label="リセット", text="reset"),
                            MsgAction(label="譜面を見るドン!♪", text="see_sheet"),
                            MsgAction(label="同じ難しさで選ぶドン!♪", text="s15")
                        ]))
        send_button_message(reply_token, bMsg)
コード例 #6
0
    def on_enter_rand_diff_easy(self, event):
        print("Entering ez")
        reply_token = event.reply_token

        for count, m in enumerate(MListInfo):
            es15List.append([m[0], m[2][0], m[2][1]])

        bMsg = TMsg(alt_text='Button',
                    template=ButtonsTemplate(
                        thumbnail_image_url="https://i.imgur.com/vWbUSUf.png",
                        title="★数を選べるドン!♪",
                        text="Please Select level to choose from.",
                        actions=[MsgAction(label="★1~5", text="s15")]))
        send_button_message(reply_token, bMsg)