-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnaruto_bot.py
199 lines (109 loc) · 5.63 KB
/
naruto_bot.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# インストールした discord.py を読み込む
import discord
# 自分のBotのアクセストークンに置き換えてください
TOKEN = (process.env.TOKEN)
# 接続に必要なオブジェクトを生成
client = discord.Client()
# 起動時に動作する処理
@client.event
async def on_ready():
# 起動したらターミナルにログイン通知が表示される
print('ログインしました')
# メッセージ受信時に動作する処理
@client.event
async def on_message(message):
# メッセージ送信者がBotだった場合は無視する
if message.author.bot:
return
# 「ナルト」と発言したら返る処理
if message.content == 'ナルト':
await message.channel.send('''[舞踏会にて]
トニー : まさか私が別人だと思っているの?
マリア : 私はあなたがそうでないことを知ってる。
トニー : それとも以前に会ったことがあるとでも?
マリア : 私たちがそうでないことは知っている。
トニー : 私は感じた...今までにないことが起こると思っていました。しかし、これはそれ以上のものだ。
マリア : 私の手は冷たいわ。
マリア : あなたの手もね。
マリア : とても暖かい。
トニー : とても美しい。
マリア : 美しい。
トニー : 信じられないくらいです。冗談じゃないのかい?
マリア : 私はまだそのような冗談の言い方を学んでいないわ。今では一生できないと思う。
ベルナルド : 手を離せ、アメリカ人!
マリア : ナルト!?
ベルナルド : 私の妹に近づかないでください。
トニー : 妹?
ベルナルド: 彼が彼らの一員であることがわからなかったのですか?
マリア:私には彼しか見えませんでした。
ベルナルド : 彼らが求めるものは一つプエルトリコ人の女の子に求めているものがあります。
トニー : それは嘘だよ
リフ:あとでね、トニー
チノ:逃げろ
トニー :聞くなよ。
ベルナルド : 彼女は君の話を聞く前に僕の話を聞くよ。
: もし二人が解決したいなら...
: 頼むよ、君たち!すべてがうまくいっていたのに。さあ、来てください。みんなで楽しく過ごそうじゃないか。
マリア : ナルド...
ベルナルド : 彼女をここから連れ出してください。私たちは家に帰ります。
マリア : ナルド、私の最初のダンスです。
ベルナルド : お願いです。私たちは家族です。さあ、行ってください。
チノ : さあ、マリア。
トニー : ああ、マリア...。
ベルナルド : お前には会いたくない。
リフ : 君に話したいんだけどね。(二人だけになる)
リフ : 戦術会議にあなたが欲しいのです。ジェッツとシャーク。
ベルナルド : 喜びは私のものです。
リフ:外に出よう。
ベルナルド : あなたのような人がいると、ここの女性たちを一人にしておけないわ。あなたのような人がいると、女性を一人にしておけません。
ベルナルド : 真夜中に会おう。
リフ : ドックのお菓子屋さん?その前にジャズはやめてね。
ベルナルド : ルールは理解している。ネイティブボーイ。
リフ : アイス!''')
# 「naruto」と発言したら返る処理
if message.content == 'naruto':
await message.channel.send('''[at the ball]
Tony : Don't tell me you think I'm someone else?
Maria : I know you're not.
Tony : Or do you think we've met before?
Maria : I know we haven't.
Tony : I felt... I knew something was going to happen that had never happened before. But this is more than that.
Maria : My hands are cold.
Maria : So are your hands.
Maria : Very warm.
Tony : So beautiful.
Maria : Beautiful.
Tony : It's unbelievable. Are you kidding me?
Maria : I haven't learned how to joke like that yet. I don't think I could ever do it now.
Bernardo : Get your hands off me, American!
Maria : Naruto!
Bernardo : Stay away from my sister.
Tony : Your sister?
Bernardo : Didn't you see that he was one of them?
Maria : He was all I could see.
Bernardo : There is one thing they are looking for in a Puerto Rican girl.
Tony : That's a lie.
Riff : See you later, Tony.
Chino : Run.
Tony : Don't listen to her.
Bernardo : She'll listen to me before she listens to you.
: If you two want to work this out...
: Please, you guys! Everything was going so well. Come on, come on. Let's have a good time together, shall we?
Maria : Naldo...
Bernardo : Please take her out of here. We're going home.
Maria : Naldo, this is my first dance.
Bernardo : Please. We're a family. Now, please go.
Chino : Come on, Maria.
Tony : Oh, Maria...
Bernardo : I don't want to see you.
Riff : I'd like to talk to you. (It's just the two of us)
Riff : I want you at the tactical meeting. Jets and Sharks.
Bernardo : The pleasure is mine.
Riff : Let's go outside.
Bernardo : With someone like you, I can't leave the women here alone. I can't leave the women alone with someone like you.
Bernardo : I'll see you at midnight.
Riff : The candy store on the dock? But first, don't jazz me up.
Bernardo : I understand the rules. Native Boy.
Riff : Ice!''')
# Botの起動とDiscordサーバーへの接続
client.run(TOKEN)