forked from The13thGalaxy/BlitzKrieg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblitzkrieg.py
263 lines (224 loc) · 8.99 KB
/
blitzkrieg.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
##BlitzKrieg v.1.1
#Copyright Maya Pharis 2017
#GENERAL BOT STUFF
#Imports and Bot Command definition
import asyncio
import discord
import logging
import math
import os
import random
import sys
from discord import utils
from discord.ext.commands import Bot
logging.basicConfig(level = logging.INFO)
#Definition of BlitzKrieg's prefix.
my_bot = Bot(command_prefix = "%")
#Bot Startup
@my_bot.event
async def on_read():
print("Deleting C:\\Windows\\System32\\...")
#I have a feeling I'm gonna get straight up slugged for this.
#COMMANDS
#Command: Hello
@my_bot.command()
async def hello(*args):
return await my_bot.say("Qu'est-ce que sup, my dude?")
#Command: Ping
@my_bot.command()
async def ping(*args):
return await my_bot.say("A game released in 1972 by Atari.")
#RAINBOW SIX SIEGE
#Command: Random Operator (Rainbow Six Siege) - Attack
@my_bot.command()
async def attack():
attk = random.choice(open("data/attackers.txt",encoding='UTF-8').readlines())
await my_bot.say("You will be playing as " + attk)
#Command: Random Operator (Rainbow Six Siege) - Defense
@my_bot.command()
async def defense():
defen = random.choice(open("data/defenders.txt",encoding='UTF-8').readlines())
await my_bot.say("You will be playing as " + defen)
#OVERWATCH
'''
#Command: Overwatch Team Comp
@my_bot.command()
async def comp():
if message.content.startswith('%comp'):
await my_bot.send_message(message.channel, 'How many offense heroes do you want?')
i == 1
if i == 1:
msg = await my_bot.wait_for_message(author=message.author)
offen = msg
i = i + 1
await my_bot.send_message(message.channel, "How many defense heroes do you want?")
if i == 2:
msg = await my_bot.wait_for_message(author=message.author)
defen = msg
i = i + 1
await my_bot.send_message(message.channel, "How many tanks do you want?")
if i == 3:
msg = await my_bot.wait_for_message(author=message.author)
tan = msg
i = i + 1
await my_bot.send_message(message.channel, "How many supports do you want?")
if i == 4:
msg = await my_bot.wait_for_message(author=message.author)
supp = msg
offense = ["Genji", "McCree", "Soldier: 76", "Reaper", "Sombra", "Tracer"]
defense = ["Bastion", "Hanzo", "Junkrat", "Widowmaker", "Mei", "Torb"]
tank = ["D.Va", "Orisa", "Roadhog", "Reinhardt", "Winston", "Zarya"]
support = ["Mercy", "Lucio", "Ana", "Symmetra", "Zenyatta"]
random.shuffle(offense)
random.shuffle(defense)
random.shuffle(tank)
random.shuffle(support)
await my_bot.send_message(message.channel, "Offense Heroes: " + offense[0:(int(offen))])
'''
#Overwatch Random: DPS
@my_bot.command()
async def herodps():
dps = random.choice(open("data/dps.txt",encoding='UTF-8').readlines())
await my_bot.say("You will be playing " + dps)
#Overwatch Random: Tank
@my_bot.command()
async def herotank():
tank = random.choice(open("data/tank.txt",encoding='UTF-8').readlines())
await my_bot.say("You will be playing " + tank)
#Overwatch Random: Healer
@my_bot.command()
async def heroheal():
heal = random.choice(open("data/healer.txt",encoding='UTF-8').readlines())
await my_bot.say("You will be playing " + heal)
#Overwatch Random: Defense
@my_bot.command()
async def herodef():
herodef = random.choice(open("data/def.txt",encoding='UTF-8').readlines())
await my_bot.say("You will be playing " + herodef)
#Comp Points Rewards checker
@my_bot.command()
async def comppoints():
await my_bot.say("Please specify a rank. Use %bronze, %silver, %gold, %platinum, %master, %grandmaster or %top500.")
async def bronze():
await my_bot.say("You will recieve 100 competitive points at the end of the season. Try harder next season.")
@my_bot.command()
async def silver():
await my_bot.say("You will recieve 200 competitive points at the end of the season. A decent rank, but you can do better.")
@my_bot.command()
async def gold():
await my_bot.say("You will recieve 400 competitive points at the end of the season. Respectable rank. Can you do better?")
@my_bot.command()
async def platinum():
await my_bot.say("You will recieve 800 competitive points at the end of the season. You're probably here because of decay, aren't you?")
@my_bot.command()
async def diamond():
await my_bot.say("You will recieve 1200 competitive points at the end of the season. Impressive. Get to Master. I dare you.")
@my_bot.command()
async def master():
await my_bot.say("You will recieve 2000 competitive points at the end of the season. One step away from glory. Do it.")
@my_bot.command()
async def grandmaster():
await my_bot.say("You will recieve 3000 competitive points at the end of the season. You've done it. I saulte you, you no-life nerd.")
@my_bot.command()
async def top500():
await my_bot.say("Hats off to you, my good man. You truly are a respectable Overwatch player.")
#Command: Random Hero (Overwatch)
@my_bot.command()
async def hero():
hero = random.choice(open("data/heroes.txt",encoding='UTF-8').readlines())
await my_bot.say("You will be playing " + hero)
#IN A NUTSHELL QUOTES
#Command Set: In a Nutshell quotes
@my_bot.command()
#Blake
@my_bot.command()
async def blake():
await my_bot.say(random.choice(open("data/nutshell_quotes/Blake.txt",encoding='UTF-8').readlines()))
#Brandon
@my_bot.command()
async def brandon():
await my_bot.say(random.choice(open("data/nutshell_quotes/Brandon.txt",encoding='UTF-8').readlines()))
#Josh
@my_bot.command()
async def josh():
await my_bot.say(random.choice(open("data/nutshell_quotes/Josh.txt",encoding='UTF-8').readlines()))
#Jake
@my_bot.command()
async def jake():
await my_bot.say(random.choice(open("data/nutshell_quotes/Jake.txt",encoding='UTF-8').readlines()))
#Maya
@my_bot.command()
async def maya():
await my_bot.say(random.choice(open("data/nutshell_quotes/Maya.txt",encoding='UTF-8').readlines()))
#Gui
@my_bot.command()
async def ray():
await my_bot.say(random.choice(open("data/nutshell_quotes/Gui.txt",encoding='UTF-8').readlines()))
#Xavier
@my_bot.command()
async def xavier():
await my_bot.say(random.choice(open("data/nutshell_quotes/Xavier.txt",encoding='UTF-8').readlines()))
#Leah
@my_bot.command()
async def leah():
await my_bot.say(random.choice(open("data/nutshell_quotes/Leah.txt",encoding='UTF-8').readlines()))
#Max
@my_bot.command()
async def max():
await my_bot.say(random.choice(open("data/nutshell_quotes/Max.txt",encoding='UTF-8').readlines()))
#Laura
@my_bot.command()
async def laura():
await my_bot.say(random.choice(open("data/nutshell_quotes/Laura.txt",encoding='UTF-8').readlines()))
#British Josh
@my_bot.command()
async def britjosh():
await my_bot.say(random.choice(open("data/nutshell_quotes/British_Josh.txt",encoding='UTF-8').readlines()))
#Nelson
@my_bot.command()
async def nelson():
await my_bot.say(random.choice(open("data/nutshell_quotes/Laura.txt",encoding='UTF-8').readlines()))
#MISC
#Command: Magic 8-Ball
@my_bot.command()
async def eightball():
ball = random.choice(open("data/8ball.txt",encoding='UTF-8').readlines())
await my_bot.say(ball)
#Command: Game Selector
#Sometimes I just can't decide what game to play. Hopefully, this will help with that.
@my_bot.command()
async def game():
game = random.choice(open('data/games.txt',encoding='UTF-8').readlines())
await my_bot.say("You should play " + game)
#Command: Dad Joke
#Yes, I did.
@my_bot.command()
async def dad():
joke = random.choice(open("data/dadjokes.txt",encoding='UTF-8').readlines())
await my_bot.say(joke)
#Info
@my_bot.command()
async def info():
await my_bot.say("Welcome to BlitzKrieg's informational menu. For info on specific commands, type any of the following.")
await my_bot.say("```%info_rainbow\n%info_overwatch\n%info_nutshell\n%info_misc```")
#Info: Rainbow Six
@my_bot.command()
async def info_rainbow():
await my_bot.say("Commands for Rainbow Six Siege.")
await my_bot.say("```%attack = Chooses a random operator on the attacking side for you to play.\n%defense - Chooses a random operator from the defending side for you to play.```")
#Info: Overwatch
@my_bot.command()
async def info_overwatch():
await my_bot.say("Commands for Overwatch.")
await my_bot.say("```%hero - Chooses a random hero for you to play.\n%herodps - Chooses a random DPS hero for you to play.\n%herotank - Chooses a random tank for you to play.\n%heroheal - Chooses a random healer for you to play.\n%herodef - Chooses a random defnese hero for you to play.\n%(rank) - Tells you how many competitive points you will recieve as an end-of-season reward.```")
#Info: In-A-Nutshell
@my_bot.command()
async def info_nutshell():
await my_bot.say("Available \"In a Nutshell\" commands.")
await my_bot.say("```%maya\t%josh\n%blake\t%brandon\n%jake\t%gui\n%xavier\t%leah\n%max\t%laura\n%britjosh\t%gui```")
#Info: Misc
@my_bot.command()
async def info_misc():
await my_bot.say("Available misc. commands.")
await my_bot.say("```%eightball - Gives you a Magic Eight Ball response to a question.\n%game = Game Selector. Gives you a random game to play.```")
my_bot.run(token)