-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuki.py
36 lines (31 loc) · 960 Bytes
/
buki.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- encoding: utf-8 -*-
import urllib
import json
from datetime import datetime
from linebot import (
LineBotApi, WebhookHandler
)
from linebot.models import (
MessageEvent, TextMessage, TextSendMessage, ImageSendMessage, ImagemapSendMessage
)
def get_subspe(line_bot_api, event, name, sub, special):
line_bot_api.reply_message(
event.reply_token, [
TextSendMessage(text="ブキ: {weapon}\nサブ: {sub}\nスペシャル: {special}".format(
weapon=name,
sub=sub,
special=special
))
]
)
def get_weapons(line_bot_api, event, text, *names):
weapons = []
weapons = "\n".join(names)
line_bot_api.reply_message(
event.reply_token, [
TextSendMessage(text="{text}のブキ一覧\n{weapons}".format(
text=text,
weapons=weapons
))
]
)