updated requirements.txt and bugfixes in robottas.py
This commit is contained in:
parent
66eee52bb5
commit
c4955c4298
2
requirements.txt
Normal file → Executable file
2
requirements.txt
Normal file → Executable file
@ -1,3 +1,5 @@
|
|||||||
|
beautifulsoup4==4.9.3
|
||||||
discord.py==2.2.3
|
discord.py==2.2.3
|
||||||
fastf1==3.0.3
|
fastf1==3.0.3
|
||||||
|
jdata==0.5.3
|
||||||
Requests==2.31.0
|
Requests==2.31.0
|
||||||
|
14
robottas.py
14
robottas.py
@ -854,7 +854,7 @@ class Robottas(commands.Bot):
|
|||||||
|
|
||||||
@self.command()
|
@self.command()
|
||||||
async def danger(ctx):
|
async def danger(ctx):
|
||||||
await ctx.send("That's some dangerous driving! " + name_dict["HAM"]
|
await ctx.send("That's some dangerous driving! " + name_dict["HAM"])
|
||||||
|
|
||||||
|
|
||||||
@self.command()
|
@self.command()
|
||||||
@ -864,7 +864,7 @@ class Robottas(commands.Bot):
|
|||||||
|
|
||||||
@self.command()
|
@self.command()
|
||||||
async def flip(ctx):
|
async def flip(ctx):
|
||||||
await ctx.send( random.choice(["Heads","Tails")
|
await ctx.send( random.choice(["Heads","Tails"]))
|
||||||
|
|
||||||
|
|
||||||
@self.command()
|
@self.command()
|
||||||
@ -877,10 +877,8 @@ class Robottas(commands.Bot):
|
|||||||
try:
|
try:
|
||||||
con = sqlite3.connect('races.db')
|
con = sqlite3.connect('races.db')
|
||||||
cur = con.cursor()
|
cur = con.cursor()
|
||||||
for row in cur.execute("select * from quotes " +
|
for row in cur.execute('select * from quotes order by Random() limit 1'):
|
||||||
"order by random() " +
|
|
||||||
"limit 1")
|
|
||||||
|
|
||||||
message = row[0] + " -- " + row[1] + " " + row[2]
|
message = row[0] + " -- " + row[1] + " " + row[2]
|
||||||
await ctx.send(message)
|
await ctx.send(message)
|
||||||
break # There should only be one row anyway
|
break # There should only be one row anyway
|
||||||
@ -922,7 +920,7 @@ class Robottas(commands.Bot):
|
|||||||
cur = con.cursor()
|
cur = con.cursor()
|
||||||
for row in cur.execute('select * from races ' +
|
for row in cur.execute('select * from races ' +
|
||||||
'order by Random() ' +
|
'order by Random() ' +
|
||||||
'limit 1')
|
'limit 1'):
|
||||||
|
|
||||||
watched = self.decode_watched(row[2])
|
watched = self.decode_watched(row[2])
|
||||||
await ctx.send(f"Location: {row[0]} Year: {row[1]} {watched}")
|
await ctx.send(f"Location: {row[0]} Year: {row[1]} {watched}")
|
||||||
@ -943,7 +941,7 @@ class Robottas(commands.Bot):
|
|||||||
for row in cur.execute('select * from races ' +
|
for row in cur.execute('select * from races ' +
|
||||||
'where watched = 0 ' +
|
'where watched = 0 ' +
|
||||||
'order by Random() ' +
|
'order by Random() ' +
|
||||||
'limit 1')
|
'limit 1'):
|
||||||
|
|
||||||
watched = self.decode_watched(row[2])
|
watched = self.decode_watched(row[2])
|
||||||
await ctx.send(f"Location: {row[0]} Year: {row[1]}")
|
await ctx.send(f"Location: {row[0]} Year: {row[1]}")
|
||||||
|
Loading…
Reference in New Issue
Block a user